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
Describe the bug
I have validations set for my server to authorise users based on Bearer tokens, when using the websocket, The server is showing connection successfull and I get error logs for connection highjack because I am writing 401 errors to the response writter.
Even If I ignore the un-authorized request and not move forward, the connection remains open.
To Reproduce
Add a middleware which returns and writes to the http.ResponseWriter and hijack can be reproduced.
Check for authorization and return without calling inner.ServeHTTP(w,r), the connection to websocket remains open.
The code is
The error is
Expected behavior
I should be able to get the connection in middleware for the particular websocket request and close connection in case of unauthorised request
Screenshots
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
OS: [e.g. Linux]
gofr version [e.g. v1.5.0]
go version [e.g. 1.21]
More description
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have validations set for my server to authorise users based on Bearer tokens, when using the websocket, The server is showing connection successfull and I get error logs for connection highjack because I am writing 401 errors to the response writter.
Even If I ignore the un-authorized request and not move forward, the connection remains open.
To Reproduce
Add a middleware which returns and writes to the http.ResponseWriter and hijack can be reproduced.
Check for authorization and return without calling inner.ServeHTTP(w,r), the connection to websocket remains open.
The code is
The error is
Expected behavior
I should be able to get the connection in middleware for the particular websocket request and close connection in case of unauthorised request
Screenshots
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
More description
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: