summaryrefslogtreecommitdiffstats
path: root/web/nginx.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'web/nginx.conf.example')
-rw-r--r--web/nginx.conf.example25
1 files changed, 25 insertions, 0 deletions
diff --git a/web/nginx.conf.example b/web/nginx.conf.example
index 9fc942f..d440ab5 100644
--- a/web/nginx.conf.example
+++ b/web/nginx.conf.example
@@ -37,6 +37,31 @@ server {
37 add_header Cache-Control "public, max-age=31536000, immutable"; 37 add_header Cache-Control "public, max-age=31536000, immutable";
38 } 38 }
39 39
40 # The browser app: static files, no framework runtime.
41 location = /play {
42 return 301 /play/;
43 }
44
45 location /play/ {
46 try_files $uri $uri/ /play/index.html;
47 add_header Cache-Control "no-cache";
48 add_header X-Frame-Options "DENY" always;
49 add_header X-Content-Type-Options "nosniff" always;
50 }
51
52 # WebSocket gateway. Keep the upgrade headers and a long read timeout:
53 # a crash round can idle for a while between pushes.
54 location = /ws {
55 proxy_pass http://127.0.0.1:8890;
56 proxy_http_version 1.1;
57 proxy_set_header Upgrade $http_upgrade;
58 proxy_set_header Connection "upgrade";
59 proxy_set_header Host $host;
60 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
61 proxy_read_timeout 3600s;
62 proxy_send_timeout 3600s;
63 }
64
40 # The page rescans bin/ on every request, so don't cache it. 65 # The page rescans bin/ on every request, so don't cache it.
41 location = /index.php { 66 location = /index.php {
42 include fastcgi_params; 67 include fastcgi_params;