You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following your stomp-spring-react project on github. The problem is that I don't receive the header on the server side. I have a JWT Authentication Filter, that gets hit, but I don't get the header payload when I want to access it via: request.getHeader. I checked all the header names using request.getHeaderNames but I don't see it there either. Is this a bug or am I missing something here?
The text was updated successfully, but these errors were encountered:
I do not use Spring myself. Based on previous issues and Spring documentation I can suggest the following:
WebSocket internally connects using HTTP(S). request.getHeader returns headers from the HTTP connection. WebSocket protocol does not allow setting custom headers for the HTTP connection.
This example demonstrates Token authentication, however you can authenticate using headers you are sending. Your header will be accessible through accessor which is MessageHeaderAccessor.getAccessor(message, StompHeaderAccessor.class).
Hello!
I have the following code, using the stomp js client:
I was following your
stomp-spring-react
project on github. The problem is that I don't receive the header on the server side. I have a JWT Authentication Filter, that gets hit, but I don't get the header payload when I want to access it via:request.getHeader
. I checked all the header names usingrequest.getHeaderNames
but I don't see it there either. Is this a bug or am I missing something here?The text was updated successfully, but these errors were encountered: