diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-02 19:38:12 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-02 19:38:12 +0200 |
commit | bfcd592e8f0673a86ef452b22dab353c59f698e7 (patch) | |
tree | abb218c8409fceb9ad403b00cd90e82c2efdc2f8 /host | |
parent | Forgot to save a file (diff) | |
download | Rory-Open-Architecture-bfcd592e8f0673a86ef452b22dab353c59f698e7.tar.xz |
Add CORS to git
Diffstat (limited to 'host')
-rwxr-xr-x | host/Rory-nginx/hosts/rory.gay/git.nix | 8 |
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'; + ''; } |