-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] websockets dont add or pass custom headers #426
Comments
@si458 Thanks for the investigation. Custom headers are currently only applied to HTTP requests (after all, it is a HTTP reverse proxy). I think I can add custom header supports into websocket as well, will take a look at the issue this weekend. |
@tobychui thank you! This will explain why our meshcentralrouter app and meshctrl.js app don't work, because we have to send custom headers on the websocket Would it be possible to just PASS any existing headers then over the websocket, rather than messing around with adding custom headers? Only issue we have is our custom header |
@si458 I need to have a check at the source code though, as I remember current implementation of websocket proxy only copies a limited sets of valid headers (for websocket) from the original request. zoraxy/src/mod/websocketproxy/websocketproxy.go Lines 123 to 136 in 4d163fe
Though I understand that some projects might want to sneak in some custom headers like in this case |
@tobychui a toggle option would be perfectly fine by me! One other tiny bug (might be related) |
- Optimized types and definitions - Moved shutdown seq to start.go file - Moved authelia to auth/sso module - Added different auth types support (wip) - Updated proxy config structure - Added v3.1.4 to v3.1.5 auto upgrade utilities - Fixed #426 - Optimized status page UI - Added options to disable uptime montior in config
@si458 I think this should be fixed in the latest commit, but since I don't have anything to test it on, would you mind testing out the v3.1.5 build from the dev branch (build from source and run it on some kind of test bench) to see if it works? |
@tobychui do you have a dev docker image at all? |
@si458 I guess no. I do not personally maintain the docker build of Zoraxy. You can ping and ask for help from @PassiveLemon if you really need a docker image. |
@tobychui no worries leave it with me will do a test for you! |
@tobychui ok i got it to build a docker image
so the passing of my custom headers now work! i am seeing an error now tho in our software saying |
ok the error however i tested nginx and traefik and these dont produce these errors? |
@si458 This snippet shows how websocket close is handled in Zoraxy websocket proxy router. zoraxy/src/mod/websocketproxy/websocketproxy.go Lines 218 to 258 in 4d163fe
If you are getting 1006 error, you can try enable the Verbal Mode by modifying this section in the top of websocketproxy.go and test it again. You should see the error from Zoraxy's STDOUT.
|
@tobychui great! I will give that A try tomorrow ! |
Describe the bug
websockets dont add or pass custom headers
To Reproduce
Steps to reproduce the behavior:
Expected behavior
websocket headers to include your original custom headers AND custom headers you set inside the web ui of zoraxy
Screenshots
If applicable, add screenshots to help explain your problem.
Browser (if it is a bug appears on the UI section of the system):
Host Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: