Skip to content

Commit 9f1cc32

Browse files
committed
1 parent 055801b commit 9f1cc32

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

root/defaults/nginx.conf

+9-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ http {
2323
types_hash_max_size 2048;
2424
variables_hash_max_size 2048;
2525
large_client_header_buffers 4 16k;
26-
26+
2727
# server_tokens off;
2828

2929
# server_names_hash_bucket_size 64;
@@ -72,6 +72,14 @@ http {
7272
#passenger_root /usr;
7373
#passenger_ruby /usr/bin/ruby;
7474

75+
##
76+
# WebSocket proxying
77+
##
78+
map $http_upgrade $connection_upgrade {
79+
default upgrade;
80+
'' close;
81+
}
82+
7583
##
7684
# Virtual Host Configs
7785
##

root/defaults/proxy.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ proxy_set_header X-Forwarded-Host $host;
2323
proxy_set_header X-Forwarded-Ssl on;
2424
proxy_redirect http:// $scheme://;
2525
proxy_http_version 1.1;
26-
proxy_set_header Connection "";
26+
proxy_set_header Upgrade $http_upgrade;
27+
proxy_set_header Connection $connection_upgrade;
2728
#proxy_cookie_path / "/; HTTPOnly; Secure"; # enable at your own risk, may break certain apps
2829
proxy_cache_bypass $cookie_session;
2930
proxy_no_cache $cookie_session;

0 commit comments

Comments
 (0)