From a28ceea21722cf945ac095dfaf07644f1cf24d05 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 1 May 2023 16:43:13 +0200 Subject: Always serve index.html by default --- host/Rory-nginx/hosts/rory.gay/matrix.nix | 2 -- host/Rory-nginx/hosts/rory.gay/mru.nix | 10 +++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/host/Rory-nginx/hosts/rory.gay/matrix.nix b/host/Rory-nginx/hosts/rory.gay/matrix.nix index 1bc038e..26507fc 100755 --- a/host/Rory-nginx/hosts/rory.gay/matrix.nix +++ b/host/Rory-nginx/hosts/rory.gay/matrix.nix @@ -19,8 +19,6 @@ add_header 'Content-Length' 0; return 204; } - # default to /index.html if file not found - try_files $uri $uri/ index.html; ''; }; locations."/_synapse/client".proxyPass = "http://192.168.1.5:8008"; diff --git a/host/Rory-nginx/hosts/rory.gay/mru.nix b/host/Rory-nginx/hosts/rory.gay/mru.nix index e82c0f9..d309946 100755 --- a/host/Rory-nginx/hosts/rory.gay/mru.nix +++ b/host/Rory-nginx/hosts/rory.gay/mru.nix @@ -7,9 +7,13 @@ index = "index.html"; extraConfig = '' add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + add_header 'Access-Control-Allow-Methods' '*'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Expose-Headers' '*'; + add_header 'Access-Control-Max-Age' 1728000; + + # default to /index.html if file not found + try_files $uri $uri/ index.html; ''; }; }; -- cgit 1.4.1