summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-02 19:38:12 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-02 19:38:12 +0200
commitbfcd592e8f0673a86ef452b22dab353c59f698e7 (patch)
treeabb218c8409fceb9ad403b00cd90e82c2efdc2f8
parentForgot to save a file (diff)
downloadRory-Open-Architecture-bfcd592e8f0673a86ef452b22dab353c59f698e7.tar.xz
Add CORS to git
-rwxr-xr-xhost/Rory-nginx/hosts/rory.gay/git.nix8
1 files changed, 7 insertions, 1 deletions
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';
+  '';
 }