0

Can I add custom cookies over websocket in Spring SockJS implementation? The way we can add it with http request/ response?

Forget to mention that I see way to read cookie from headers :: HttpHeaders headers= session.getHandshakeHeaders(); -But I do not see a way to set headers. With headers I can read the cookies -but how to set it?

cpandey05
  • 1,241
  • 2
  • 17
  • 30

1 Answers1

1

This is all work-in-progress still, but at this time you can configure a HandshakeInterceptor on the DefaultSockJsService. That gives you access to the request and response before and after the handshake.

Rossen Stoyanchev
  • 4,910
  • 23
  • 26
  • Discussed here https://github.com/sockjs/sockjs-node/pull/29#issuecomment-2733120, for now have done without cookies – cpandey05 Sep 04 '13 at 13:45