How to set Access-Control-Allow-Origin * in nginx
To allow access from all origins, use
add_header 'Access-Control-Allow-Origin' '*' always;
You might want to add
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
as well.
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow