Skip to content

Instantly share code, notes, and snippets.

@NicolaiSchmid
Last active February 7, 2018 00:34
Show Gist options
  • Save NicolaiSchmid/bc4c613b42464e7592ecc7fef9f37c87 to your computer and use it in GitHub Desktop.
Save NicolaiSchmid/bc4c613b42464e7592ecc7fef9f37c87 to your computer and use it in GitHub Desktop.
add_header 'Access-Control-Allow-Origin' '*';
#
# Om nom nom cookies
#
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,cache-control';
#
# Tell client that this pre-flight info is valid for 20 days
#
add_header 'Access-Control-Max-Age' 1728000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment