cross domain - Access-Control-Allow-Origin not working for image extensions in Nginx -


i have configuration in nginx add cross-origin , its working fine, header allow-origin present in response headers:

location ~* \.(woff|woff2|oft|eot|ttf)$ {         add_header cache-control "max-age=1604800";         add_header access-control-allow-origin '*';         log_not_found off; } 

but when try same image extensions not working, no allow-origin header in response headers:

location \.(ico|gif|jpg|jpeg|png|flv|pdf|thumb)$ {         add_header cache-control "max-age=29030400";         add_header access-control-allow-origin '*';         log_not_found off; } 

why not working images?

i using regular expression "." without regular expression prefix "~" or "~*".


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -