Always serve index.html by default
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;
'';
};
};
|