Skip to content

Instantly share code, notes, and snippets.

@floodedcodeboy
Created June 15, 2015 16:46
Show Gist options
  • Save floodedcodeboy/55d45db318629f208f8f to your computer and use it in GitHub Desktop.
Save floodedcodeboy/55d45db318629f208f8f to your computer and use it in GitHub Desktop.
nginx cors setup
...
location / {
add_header Access-Control-Allow-Origin $http_origin;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE';
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, origin, accept';
add_header 'Access-Control-Allow-Credentials' 'true';
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment