From 92850e56f457482a8ac27ed6e848439932e641a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=81nis=20Miez=C4=ABtis?= Date: Tue, 19 Apr 2016 09:58:40 +0300 Subject: [PATCH 1/2] Added websocket support for SSL connections --- nginx/proxy_ssl.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/proxy_ssl.conf b/nginx/proxy_ssl.conf index 65c7c66..de29fa0 100644 --- a/nginx/proxy_ssl.conf +++ b/nginx/proxy_ssl.conf @@ -45,6 +45,10 @@ server { proxy_redirect http:// https://; #auth_basic "Restricted"; #auth_basic_user_file /etc/secrets/htpasswd; + # WebSocket support (nginx 1.4) + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; } } From 84847e75b5e99af28015930990a77bca171d44f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=81nis=20Miez=C4=ABtis?= Date: Tue, 19 Apr 2016 09:59:17 +0300 Subject: [PATCH 2/2] Support for HTTP websocket connections --- nginx/proxy_nossl.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/proxy_nossl.conf b/nginx/proxy_nossl.conf index 1d2c019..c03f71d 100644 --- a/nginx/proxy_nossl.conf +++ b/nginx/proxy_nossl.conf @@ -15,5 +15,9 @@ server { proxy_read_timeout 90; #auth_basic "Restricted"; #auth_basic_user_file /etc/secrets/htpasswd; + # WebSocket support (nginx 1.4) + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; } }