Skip to content

Instantly share code, notes, and snippets.

@Benzene
Created September 2, 2011 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Benzene/1190198 to your computer and use it in GitHub Desktop.
Save Benzene/1190198 to your computer and use it in GitHub Desktop.
location /main.html {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'POST, OPTIONS';
add_header Content-Type 'text/plain; charset=UTF-8';
add_header Access-Control-Allow-Headers 'Content-Type, Content-Length, Connection';
if ($request_method = 'OPTIONS') {
return 200;
}
proxy_pass http://backendserver;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment