mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
11 lines
427 B
Text
11 lines
427 B
Text
if ($request_method = 'OPTIONS') {
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE';
|
|
add_header 'Access-Control-Allow-Headers' 'Content-Type';
|
|
# 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;
|
|
}
|