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 前置Nginx或者Cloudflare之后报错误400 #51

Closed
5high opened this issue Jan 16, 2023 · 1 comment
Closed

Websocket 前置Nginx或者Cloudflare之后报错误400 #51

5high opened this issue Jan 16, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@5high
Copy link

5high commented Jan 16, 2023

如果前置了Cloudflare或者Nginx的proxy_pass , websocket 会报错误400。

能否指点一下问题出在哪里?

@5high 5high added the bug Something isn't working label Jan 16, 2023
@yisier
Copy link
Owner

yisier commented Jan 29, 2023

nignx 反向代理 ws,一般需要配置:

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

@yisier yisier closed this as completed Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants