]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/nginx/peertube
Only create refresh job if needed
[github/Chocobozzz/PeerTube.git] / support / nginx / peertube
index 914ca3741a39d9e7d6c4c4ce9cdb552f0ef7d779..fee0f5d1c09144460ee6c97b6aa9660f51cd18b5 100644 (file)
@@ -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
@@ -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";
+  }
 }