mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-02-02 07:40:43 +03:00
refactored nginx configs
- handle CORS within nginx - remove allow-headers from CORS - add custom dynamic error pages - remove unused fastcgi - removed OPTIONS backend - remove previous custom errorDirective - moved proxy directives to appropiate file
This commit is contained in:
10
nginx/cors.conf
Normal file
10
nginx/cors.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE';
|
||||
# cache CORS for 24 hours
|
||||
add_header 'Access-Control-Max-Age' 86400;
|
||||
# return empty response for preflight
|
||||
add_header 'Content-Type' 'text/plain; charset=UTF-8';
|
||||
add_header 'Content-Length' 0;
|
||||
return 204;
|
||||
}
|
||||
Reference in New Issue
Block a user