Answer the question
In order to leave comments, you need to log in
How to add header for nginx svg files?
Good afternoon, I need to add the header Access-Control-Allow-Origin "*" for all files with svg format.
Answer the question
In order to leave comments, you need to log in
like this
location ~ \.(js|css|png|jpg|jpeg|gif|ico|html|woff|woff2|ttf|svg|eot|otf)$ {
add_header "Access-Control-Allow-Origin" "* ";
add_header Cache-Control "public";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question