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

Docs: Nginx + websockets #948

Merged
merged 1 commit into from Feb 10, 2021
Merged

Docs: Nginx + websockets #948

merged 1 commit into from Feb 10, 2021

Conversation

JoseKilo
Copy link
Contributor

@JoseKilo JoseKilo commented Feb 4, 2021

I was trying a new deployment using Nginx => Gunicorn => Uvicorn.
The app serves some websocket endpoints using Starlette.

I was getting 404 errors for every connection and didn't get any logging explaining what was happening.
After some debugging I found out that the Connection/Upgrade headers need to be set explicitly in the Nginx config, otherwise Nginx assumes that they shouldn't be forwarded.

More info: https://nginx.org/en/docs/http/websocket.html

Nginx requires that we set the Connection/Upgrade headers explicitly in
the config, otherwise Nginx assumes that they shouldn't be forwarded.

More info: https://nginx.org/en/docs/http/websocket.html
Copy link
Member

@euri10 euri10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @JoseKilo that will certainly save some headaches to someone else ! (make s me think I love traefik even more, ws and wss just worked out off the box)

@euri10 euri10 merged commit 1291b5d into encode:master Feb 10, 2021
@euri10 euri10 mentioned this pull request Feb 19, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants