18 lines
529 B
Text
18 lines
529 B
Text
set $cors_origin "http://sys.4chan.org";
|
|
|
|
if ($http_origin ~ "^https?://(boards|reports|sys|team)\.(4chan|4channel)\.org$") {
|
|
set $cors_origin $http_origin;
|
|
}
|
|
|
|
add_header Access-Control-Allow-Origin $cors_origin;
|
|
add_header Access-Control-Allow-Methods "GET, OPTIONS";
|
|
add_header Access-Control-Allow-Headers If-Modified-Since;
|
|
add_header Access-Control-Allow-Credentials true;
|
|
add_header Access-Control-Max-Age 1728000;
|
|
|
|
more_set_headers "Vary: Origin, Accept-Encoding";
|
|
|
|
if ($request_method = OPTIONS) {
|
|
return 200;
|
|
}
|
|
|