From 4a57b65cc5a3cea50c30c0e93eee7490845a170d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jan 2019 09:10:24 +0100 Subject: Support socket.io in nginx template --- support/nginx/peertube | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'support/nginx') diff --git a/support/nginx/peertube b/support/nginx/peertube index 914ca3741..54ffdcc32 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube @@ -158,4 +158,16 @@ server { proxy_set_header Host $host; proxy_pass http://localhost:9000; } + + location /socket.io { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + + proxy_pass http://localhost:9000; + + # enable WebSockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } } -- cgit v1.2.3 From 7eeb6a0ba4028d0e20847b846332dd0b7747c7f8 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Sun, 10 Feb 2019 21:36:41 +0100 Subject: Nginx config file: remove text/html from gzip_types As stated by https://nginx.org/en/docs/http/ngx_http_gzip_module.html, text/html is always part of the gzip_types. This removes a warning when checking the Nginx configuration files. --- support/nginx/peertube | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'support/nginx') diff --git a/support/nginx/peertube b/support/nginx/peertube index 54ffdcc32..fee0f5d1c 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube @@ -41,7 +41,7 @@ server { # It might be nice to compress JSON, but leaving that out to protect against potential # compression+encryption information leak attacks like BREACH. gzip on; - gzip_types text/css text/html application/javascript; + gzip_types text/css application/javascript; gzip_vary on; # Enable HSTS -- cgit v1.2.3