diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-14 07:24:04 +0100 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-14 07:24:55 +0100 |
commit | d935a4f3e1d67152149945adc31b7886ccf37701 (patch) | |
tree | ae4d39bda4c767b4675d6477c7d9c3ed88939237 /host/Rory-desktop/nginx/discord.localhost.nix | |
parent | Update synapse cache settings (diff) | |
download | Rory-Open-Architecture-d935a4f3e1d67152149945adc31b7886ccf37701.tar.xz |
Desktop updates
Diffstat (limited to 'host/Rory-desktop/nginx/discord.localhost.nix')
-rwxr-xr-x | host/Rory-desktop/nginx/discord.localhost.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/host/Rory-desktop/nginx/discord.localhost.nix b/host/Rory-desktop/nginx/discord.localhost.nix new file mode 100755 index 0000000..149d2b1 --- /dev/null +++ b/host/Rory-desktop/nginx/discord.localhost.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: + +{ + root = "/www/discord"; + addSSL = true; + enableACME = false; + + # We don't care about certificates around here... + sslCertificate = "${pkgs.path}/nixos/tests/common/acme/server/acme.test.cert.pem"; + sslCertificateKey = "${pkgs.path}/nixos/tests/common/acme/server/acme.test.key.pem"; + + + extraConfig = '' + autoindex on; + 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'; + ''; + + locations = { + "/" = { + index = "index.html"; + extraConfig = '' + 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; + ''; + }; + }; +} |