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 proxying #7

Merged
merged 4 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion root/defaults/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ http {
types_hash_max_size 2048;
variables_hash_max_size 2048;
large_client_header_buffers 4 16k;

# server_tokens off;

# server_names_hash_bucket_size 64;
Expand Down Expand Up @@ -72,6 +72,14 @@ http {
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;

##
# WebSocket proxying
##
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

##
# Virtual Host Configs
##
Expand Down
3 changes: 2 additions & 1 deletion root/defaults/proxy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Ssl on;
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
#proxy_cookie_path / "/; HTTPOnly; Secure"; # enable at your own risk, may break certain apps
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
Expand Down