diff options
Diffstat (limited to 'host')
-rwxr-xr-x | host/Rory-nginx/services/matrix/draupnir.nix | 2 | ||||
-rwxr-xr-x | host/Rory-nginx/services/nginx/nginx.nix | 2 | ||||
-rwxr-xr-x | host/Rory-nginx/services/nginx/rory.gay/wad-api.nix | 32 |
3 files changed, 35 insertions, 1 deletions
diff --git a/host/Rory-nginx/services/matrix/draupnir.nix b/host/Rory-nginx/services/matrix/draupnir.nix index 66d4648..e9fba15 100755 --- a/host/Rory-nginx/services/matrix/draupnir.nix +++ b/host/Rory-nginx/services/matrix/draupnir.nix @@ -21,7 +21,7 @@ autojoinOnlyIfManager = true; # Let's not open ourselves up to DoS attacks automaticallyRedactForReasons = [ "*" ]; # I always want autoredact fasterMembershipChecks = true; - roomStateBackingStore.enabled = true; + # roomStateBackingStore.enabled = true; # broken under nix. backgroundDelayMS = 10; # delay isn't needed, I don't mind the performance hit pollReports = false; # this is a single person homeserver... let's save ourself the work diff --git a/host/Rory-nginx/services/nginx/nginx.nix b/host/Rory-nginx/services/nginx/nginx.nix index 375c3c3..1842a2e 100755 --- a/host/Rory-nginx/services/nginx/nginx.nix +++ b/host/Rory-nginx/services/nginx/nginx.nix @@ -51,6 +51,8 @@ in "vives.thearcanebrony.net" = serveDir { path = "/data/nginx/html_vives"; }; "git.rory.gay" = serveDir { path = "/data/nginx/html_git"; }; + "wad.rory.gay" = serveDir { path = "/data/nginx/html_wad"; } // { locations."/".extraConfig = "autoindex on; try_files $uri $uri/ /index.html;"; }; + "wad-api.rory.gay" = import ./rory.gay/wad-api.nix; "thearcanebrony.net" = import ./thearcanebrony.net/root.nix; "sentry.thearcanebrony.net" = import ./thearcanebrony.net/sentry.nix; diff --git a/host/Rory-nginx/services/nginx/rory.gay/wad-api.nix b/host/Rory-nginx/services/nginx/rory.gay/wad-api.nix new file mode 100755 index 0000000..65e9bdb --- /dev/null +++ b/host/Rory-nginx/services/nginx/rory.gay/wad-api.nix @@ -0,0 +1,32 @@ +{ + enableACME = true; + addSSL = true; + locations = { + "/" = { + proxyPass = "https://youthapp.inuits.dev"; + recommendedProxySettings = false; + extraConfig = '' + proxy_ssl_verify off; + proxy_set_header Host youthapp.inuits.dev; + proxy_ssl_server_name on; + + 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 + # + more_set_headers 'Access-Control-Allow-Headers: *, Authorization'; + # + # Tell client that this pre-flight info is valid for 20 days + # + more_set_headers 'Access-Control-Max-Age: 1728000'; + + if ($request_method = 'OPTIONS') { + more_set_headers 'Content-Type: text/plain; charset=utf-8'; + more_set_headers 'Content-Length: 0'; + return 204; + } + ''; + }; + }; +} |