From 4a57b65cc5a3cea50c30c0e93eee7490845a170d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jan 2019 09:10:24 +0100 Subject: [PATCH] Support socket.io in nginx template --- support/nginx/peertube | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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"; + } }