Https://enable-cors.org/server_nginx.html
# # Wide-Open CORS config for Nginx # location/{if ($request _method = ' OPTIONS ') {add_header ' Access-cont
Rol-allow-origin ' ' * ';
Add_header ' Access-control-allow-methods ' Get, POST, OPTIONS '; # Custom headers and headers various browsers *should* is OK with but aren ' t # add_header ' Acces S-control-allow-headers ' Dnt,x-customheader,keep-alive,user-agent,x-requested-with,if-modified-since,
Cache-control,content-type,content-range,range '; # Tell client, this, this pre-flight info is valid for the # Add_header ' Access-control-max-ag
E ' 1728000; Add_header ' Content-type ' text/plain;
Charset=utf-8 ';
Add_header ' content-length ' 0;
return 204;
} if ($request _method = ' POST ') {add_header ' access-control-allow-origin ' *;
Add_header ' Access-control-allow-methods ' Get, POST, OPTIONS '; Add_header ' Access-control-allow-headers ' Dnt,x-customheadeR,keep-alive,user-agent,x-requested-with,if-modified-since,cache-control,content-type,content-range,range '; Add_header ' Access-control-expose-headers ' Dnt,x-customheader,keep-alive,user-agent,x-requested-with,
If-modified-since,cache-control,content-type,content-range,range ';
} if ($request _method = ' get ') {add_header ' access-control-allow-origin ' *;
Add_header ' Access-control-allow-methods ' Get, POST, OPTIONS '; Add_header ' Access-control-allow-headers ' Dnt,x-customheader,keep-alive,user-agent,x-requested-with,
If-modified-since,cache-control,content-type,content-range,range '; Add_header ' Access-control-expose-headers ' Dnt,x-customheader,keep-alive,user-agent,x-requested-with,
If-modified-since,cache-control,content-type,content-range,range '; }
}