mirror of
https://github.com/status-im/infra-faucet.git
synced 2025-02-25 00:58:55 +00:00
11 lines
526 B
Django/Jinja
11 lines
526 B
Django/Jinja
# This enables CORS for all status.im subdomains
|
|
if ($http_origin ~* '{{ faucet_cors_rule | mandatory }}') {
|
|
add_header 'Access-Control-Allow-Origin' "$http_origin";
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
|
|
add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';
|
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
|
}
|
|
if ($request_method = OPTIONS) {
|
|
return 204;
|
|
}
|