I have a website with a separate subdomain for static files. I found out that I need to set the Access-Control-Allow-Origin
header in order for certain AJAX features to work, specifically fonts. I want to be able to access the static subdomain from localhost
for testing as well as from the www
subdomain. The simple solution seeems to be Access-Control-Allow-Origin: *
. My server uses nginx.
What are the main reasons that you might not want to use a wildcard for Access-Control-Allow-Origin
in your response header?