Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Spring SockJS 実装で websocket を介してカスタム Cookie を追加できますか? httpリクエスト/レスポンスで追加する方法は?
ヘッダーから Cookie を読み取る方法があることを忘れないでください:: HttpHeaders headers= session.getHandshakeHeaders(); -しかし、ヘッダーを設定する方法がわかりません。ヘッダーを使用すると、Cookie を読み取ることができますが、設定方法は?
これはすべてまだ進行中の作業ですが、現時点では、DefaultSockJsService で HandshakeInterceptor を構成できます。これにより、ハンドシェイクの前後にリクエストとレスポンスにアクセスできます。