summaryrefslogtreecommitdiff
path: root/playbooks.d/webserver-nginx/share
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-04-26 11:23:52 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-04-26 11:23:52 +0200
commitb4accd0cc7d335c38bffe11c317827a80df897cf (patch)
treef26b07afdb1e608c3fd22ce4f217ed648df98c21 /playbooks.d/webserver-nginx/share
parent4602858936ba085829ada41ee169e033b3e4337f (diff)
Add some nginx settings for websockets
Diffstat (limited to 'playbooks.d/webserver-nginx/share')
-rw-r--r--playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi8
1 files changed, 7 insertions, 1 deletions
diff --git a/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi b/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi
index 29003bb..af83aaf 100644
--- a/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi
+++ b/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.fedi
@@ -1,3 +1,8 @@
+map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+}
+
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
@@ -15,10 +20,11 @@ server {
location / {
proxy_pass http://127.0.0.1:3000;
-
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
}
}