Browse Source

Add recommended headers

Manav Rathi 1 year ago
parent
commit
9fe8d1fd53
2 changed files with 7 additions and 1 deletions
  1. 1 1
      infra/services/status/README.md
  2. 6 0
      infra/services/status/uptime-kuma.nginx.conf

+ 1 - 1
infra/services/status/README.md

@@ -20,7 +20,7 @@ Add the service definition and nginx configuration.
 ```sh
 scp services/status/uptime-kuma.* <instance>:
 
-sudo mv uptime-kuma.service /etc/systemd/system/uptime-kuma.service
+sudo mv uptime-kuma.service /etc/systemd/system/
 sudo mv uptime-kuma.nginx.conf /root/nginx/conf.d
 ```
 

+ 6 - 0
infra/services/status/uptime-kuma.nginx.conf

@@ -15,5 +15,11 @@ server {
         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 $scheme;
+
+        # Recommended options from Uptime Kuma Wiki
+        # https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy#nginx
+        proxy_http_version 1.1;
+        proxy_set_header   Upgrade $http_upgrade;
+        proxy_set_header   Connection "upgrade";
     }
 }