hyphacoop/ansible-common

Add CORS headers to nginx

YurkoWasHere opened this issue · 1 comments

add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Methods *;

https://github.com/hyphacoop/ansible-common/blob/dev/roles/nginx/templates/nginx-site.j2#L72

Adding wildcard CORS headers for everything can lead to vulnerabilities so this should be disabled by default and be behind a flag.

Another header to add:

Access-Control-Expose-Headers: *