Skip to content
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

WebSocket Connections fail with Internal Server Error #5

Open
samuel-p opened this issue Sep 9, 2024 · 1 comment
Open

WebSocket Connections fail with Internal Server Error #5

samuel-p opened this issue Sep 9, 2024 · 1 comment

Comments

@samuel-p
Copy link

samuel-p commented Sep 9, 2024

First of all thanks for this great Traefik plugin. I played around with it for some days and found out that the middleware actually breaks WebSocket connections. I'm not 100% sure why, because I'm really new to developing Traefik plugins and also not an expert with Go, but I would assume that it is because WebSocket connections remain open permanently/significantly longer than normal http requests.

If I try to open a WebSocket connection with websocat I get this error:

$ docker run --rm -ti ghcr.io/vi/websocat wss://domain.com/ws
websocat: WebSocketError: WebSocketError: Received unexpected status code (500 Internal Server Error)
websocat: error running

For me, I found a workaround in just allowing WebSocket requests in general, but I don't think that's the best solution and probably there might be a better solution to achieve this. I also checked the similar project by tomMoulard and also found a similar issue and merge request there. Unfortunately I could not figure out if this issue/merge request is really related or not.

If you are interested in my workaround you can find it here: https://github.com/samuel-p/traefik-plugin-fail2ban/blob/test/fail2ban.go#L178

I could also open a merge request, but as I hope there could be a better solution for that, I decided to open an issue first. So let me know, if you like me to create a merge request.

@ynsta
Copy link

ynsta commented Nov 21, 2024

same issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants