diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-28 11:08:57 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-28 11:08:57 +0200 |
commit | b13cb19aa1edb0798e74dc9430b9baf1afa350c4 (patch) | |
tree | d79ac9f5d38cf0bb6110210142a01531ce8b1cba /host | |
parent | Update deployed state (diff) | |
download | Rory-Open-Architecture-b13cb19aa1edb0798e74dc9430b9baf1afa350c4.tar.xz |
Switch to headers_more
Diffstat (limited to 'host')
-rwxr-xr-x | host/Rory-nginx/hosts/rory.gay/git.nix | 10 | ||||
-rwxr-xr-x | host/Rory-nginx/hosts/rory.gay/matrix-bak.nix | 12 | ||||
-rwxr-xr-x | host/Rory-nginx/hosts/rory.gay/matrix.nix | 12 | ||||
-rwxr-xr-x | host/Rory-nginx/hosts/rory.gay/mru.nix | 10 | ||||
-rwxr-xr-x | host/Rory-nginx/hosts/rory.gay/root.nix | 12 | ||||
-rwxr-xr-x | host/Rory-nginx/hosts/thearcanebrony.net/root.nix | 4 |
6 files changed, 30 insertions, 30 deletions
diff --git a/host/Rory-nginx/hosts/rory.gay/git.nix b/host/Rory-nginx/hosts/rory.gay/git.nix index 37931a1..6aa5115 100755 --- a/host/Rory-nginx/hosts/rory.gay/git.nix +++ b/host/Rory-nginx/hosts/rory.gay/git.nix @@ -4,10 +4,10 @@ addSSL = true; extraConfig = '' autoindex on; - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, 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-Credentials' 'true'; + more_set_headers 'Access-Control-Allow-Origin' '*'; + more_set_headers 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + more_set_headers 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + more_set_headers 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + more_set_headers 'Access-Control-Allow-Credentials' 'true'; ''; } diff --git a/host/Rory-nginx/hosts/rory.gay/matrix-bak.nix b/host/Rory-nginx/hosts/rory.gay/matrix-bak.nix index 26507fc..ed47d35 100755 --- a/host/Rory-nginx/hosts/rory.gay/matrix-bak.nix +++ b/host/Rory-nginx/hosts/rory.gay/matrix-bak.nix @@ -5,18 +5,18 @@ proxyPass = "http://192.168.1.5:8008"; extraConfig = '' if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' '*'; + more_set_headers 'Access-Control-Allow-Origin' '*'; + more_set_headers 'Access-Control-Allow-Methods' '*'; # # Custom headers and headers various browsers *should* be OK with but aren't # - add_header 'Access-Control-Allow-Headers' '*'; + more_set_headers 'Access-Control-Allow-Headers' '*'; # # Tell client that this pre-flight info is valid for 20 days # - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain; charset=utf-8'; - add_header 'Content-Length' 0; + more_set_headers 'Access-Control-Max-Age' 1728000; + more_set_headers 'Content-Type' 'text/plain; charset=utf-8'; + more_set_headers 'Content-Length' 0; return 204; } ''; diff --git a/host/Rory-nginx/hosts/rory.gay/matrix.nix b/host/Rory-nginx/hosts/rory.gay/matrix.nix index 0f8420c..0c720bd 100755 --- a/host/Rory-nginx/hosts/rory.gay/matrix.nix +++ b/host/Rory-nginx/hosts/rory.gay/matrix.nix @@ -5,18 +5,18 @@ # proxyPass = "http://192.168.1.5:8008"; # extraConfig = '' # if ($request_method = 'OPTIONS') { - # add_header 'Access-Control-Allow-Origin' '*'; - # add_header 'Access-Control-Allow-Methods' '*'; + # more_set_headers 'Access-Control-Allow-Origin' '*'; + # more_set_headers 'Access-Control-Allow-Methods' '*'; # # # # Custom headers and headers various browsers *should* be OK with but aren't # # - # add_header 'Access-Control-Allow-Headers' '*'; + # more_set_headers 'Access-Control-Allow-Headers' '*'; # # # # Tell client that this pre-flight info is valid for 20 days # # - # add_header 'Access-Control-Max-Age' 1728000; - # add_header 'Content-Type' 'text/plain; charset=utf-8'; - # add_header 'Content-Length' 0; + # more_set_headers 'Access-Control-Max-Age' 1728000; + # more_set_headers 'Content-Type' 'text/plain; charset=utf-8'; + # more_set_headers 'Content-Length' 0; # return 204; # }; # ''; diff --git a/host/Rory-nginx/hosts/rory.gay/mru.nix b/host/Rory-nginx/hosts/rory.gay/mru.nix index 47aa1e5..86dd952 100755 --- a/host/Rory-nginx/hosts/rory.gay/mru.nix +++ b/host/Rory-nginx/hosts/rory.gay/mru.nix @@ -14,11 +14,11 @@ "/" = { index = "index.html"; extraConfig = '' - add_header 'Access-Control-Allow-Origin' '*'; - 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; + more_set_headers 'Access-Control-Allow-Origin' '*'; + more_set_headers 'Access-Control-Allow-Methods' '*'; + more_set_headers 'Access-Control-Allow-Headers' '*'; + more_set_headers 'Access-Control-Expose-Headers' '*'; + more_set_headers 'Access-Control-Max-Age' 1728000; # default to /index.html if file not found try_files $uri $uri/ /index.html; diff --git a/host/Rory-nginx/hosts/rory.gay/root.nix b/host/Rory-nginx/hosts/rory.gay/root.nix index 21554f3..40e9c3d 100755 --- a/host/Rory-nginx/hosts/rory.gay/root.nix +++ b/host/Rory-nginx/hosts/rory.gay/root.nix @@ -6,15 +6,15 @@ autoindex on;''; locations."= /.well-known/matrix/server".extraConfig = '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; + more_set_headers Content-Type application/json; + more_set_headers Access-Control-Allow-Origin *; return 200 '${builtins.toJSON { "m.server" = "matrix.rory.gay:443"; }}'; ''; locations."= /.well-known/matrix/client".extraConfig = '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; + more_set_headers Content-Type application/json; + more_set_headers Access-Control-Allow-Origin *; return 200 '${builtins.toJSON { "m.homeserver".base_url = "https://matrix.rory.gay"; "m.identity_server".base_url = "https://matrix.rory.gay"; @@ -22,8 +22,8 @@ }'; ''; locations."= /.well-known/matrix/support".extraConfig = '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; + more_set_headers Content-Type application/json; + more_set_headers Access-Control-Allow-Origin *; return 200 '${builtins.toJSON { admins = [ { diff --git a/host/Rory-nginx/hosts/thearcanebrony.net/root.nix b/host/Rory-nginx/hosts/thearcanebrony.net/root.nix index 3aced42..9792092 100755 --- a/host/Rory-nginx/hosts/thearcanebrony.net/root.nix +++ b/host/Rory-nginx/hosts/thearcanebrony.net/root.nix @@ -10,8 +10,8 @@ return = "301 https://gitlab.com/KinoshitaProductions/SecureDestroyer/-/raw/master/run"; }; "= /.well-known/matrix/support".extraConfig = '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; + more_set_headers Content-Type application/json; + more_set_headers Access-Control-Allow-Origin *; return 200 '${builtins.toJSON { admins = [ { |