An open source, non-profit web search engine
Allow CORS for DELETE
Daoud Clarkebace894f00c4
diff --git a/nginx.conf.sigil b/nginx.conf.sigilindex 5a6a194..39cb26b 100644--- a/nginx.conf.sigil+++ b/nginx.conf.sigil@@ -115,7 +115,7 @@ server {if ($request_method = 'OPTIONS') {add_header 'Access-Control-Allow-Origin' '*';- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';+ add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, OPTIONS';## Custom headers and headers various browsers *should* be OK with but aren't#@@ -140,6 +140,12 @@ server {add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-API-Key' always;add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;}+ if ($request_method = 'DELETE') {+ add_header 'Access-Control-Allow-Origin' '*' always;+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE' always;+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-API-Key' always;+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;+ }### End CORSgzip on;