From dfdc44f2e518d883b2921fbac2eb91ea63300898 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 19 May 2025 14:37:46 -0500 Subject: [PATCH] idk --- modules/website.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/website.nix b/modules/website.nix index 8477d27..2b87302 100644 --- a/modules/website.nix +++ b/modules/website.nix @@ -8,9 +8,19 @@ with lib; services.nginx.virtualHosts.${dn} = { forceSSL = true; enableACME = true; - locations."/" = { - proxyPass = "http://localhost:4242"; - proxyWebsockets = true; + locations = { + "/" = { + proxyPass = "http://localhost:4242"; + proxyWebsockets = true; + extraConfig = '' + add_header X-Frame-Options "SAMEORIGIN"; + add_header Access-Control-Allow-Origin * + add_header Access-Control-Allow-Origin https://api.tfcconnection.org + ''; + }; + "tfcconnection.com".return = "301 http://tfcconnection.org$request_uri"; + "www.tfcconnection.com".return = "301 http://tfcconnection.org$request_uri"; + "www.tfcconnection.org".return = "301 http://tfcconnection.org$request_uri"; }; }; # systemd.services = {