From bfcd592e8f0673a86ef452b22dab353c59f698e7 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 2 Jun 2023 19:38:12 +0200 Subject: Add CORS to git --- host/Rory-nginx/hosts/rory.gay/git.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/host/Rory-nginx/hosts/rory.gay/git.nix b/host/Rory-nginx/hosts/rory.gay/git.nix index 56954e4..37931a1 100755 --- a/host/Rory-nginx/hosts/rory.gay/git.nix +++ b/host/Rory-nginx/hosts/rory.gay/git.nix @@ -3,5 +3,11 @@ enableACME = true; addSSL = true; extraConfig = '' - autoindex on;''; + 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'; + ''; } -- cgit 1.4.1