From 780c4e1289c8110186ff8aa76639ab622c837c7b Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sat, 19 Feb 2022 00:15:28 +0300 Subject: [PATCH] add startpage --- profiles/servers/nginx.nix | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/profiles/servers/nginx.nix b/profiles/servers/nginx.nix index 2f1fbc9..c13c71f 100644 --- a/profiles/servers/nginx.nix +++ b/profiles/servers/nginx.nix @@ -13,6 +13,7 @@ "goneb.ataraxiadev.com" "jitsi.ataraxiadev.com" "stats.ataraxiadev.com" + "startpage.ataraxiadev.com" ]; }; }; @@ -41,25 +42,6 @@ proxyPass = "https://matrix.ataraxiadev.com/.well-known/matrix"; extraConfig = '' proxy_set_header X-Forwarded-For $remote_addr; - # proxy_set_header Access-Control-Allow-Origin *; - # if ($request_method = 'POST') { - # add_header 'Access-Control-Allow-Origin' '*'; - # add_header 'Access-Control-Allow-Credentials' 'true'; - # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - # add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - # } - # if ($request_method = 'GET') { - # add_header 'Access-Control-Allow-Origin' '*'; - # add_header 'Access-Control-Allow-Credentials' 'true'; - # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - # add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - # } - # if ($request_method = 'OPTIONS') { - # add_header 'Access-Control-Allow-Origin' '*'; - # add_header 'Access-Control-Allow-Credentials' 'true'; - # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - # add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - # } ''; }; } // default; @@ -93,6 +75,11 @@ proxyPass = "http://matrix-ct:8449"; } // proxyPass; } // default; + "startpage.ataraxiadev.com" = { + locations."/" = { + root = "/srv/http/startpage.ataraxiadev.com/"; + }; + } // default; }; };