Skip to content

Instantly share code, notes, and snippets.

@zsmatrix62
Created April 21, 2020 17:52
Show Gist options
  • Save zsmatrix62/e2e4801c58f8392af9d769a8c198d3e1 to your computer and use it in GitHub Desktop.
Save zsmatrix62/e2e4801c58f8392af9d769a8c198d3e1 to your computer and use it in GitHub Desktop.
location / {
if ($request_method = 'OPTIONS' ) {
add_header "Access-Control-Allow-Origin" *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
return 200;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment