Skip to content

Instantly share code, notes, and snippets.

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;
}
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;
}