Page 1 of 1

CORS Error for FontAwesome Icons

Posted: Sat Jul 22, 2017 5:58 am
by pramathesh
I'm trying to enable font awesome icons for my WordPress installation via CDN but I keep getting the following error for the fonts.

Code: Select all

Access to Font at 'https://cdn.mydomain.com/wp-content/themes/atelier/css/font/si-atelier.woff?-7oeevn' from origin 'https://scicon.co' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://scicon.co' is therefore not allowed access.
I've tried adding the code below to /home/admin/web/conf/nginx.conf & sniginx.conf and also to /etc/nginx/conf.d/internalip.conf file

Code: Select all

location ~* \.(eot|css|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
I've not had any success yet. Can someone point out the error here and guide me in resolving the same.

Re: CORS Error for FontAwesome Icons

Posted: Wed Jul 26, 2017 6:30 am
by skurudo
viewtopic.php?f=10&t=10166#p36700

If this don't fit, then please explain, how you test this CORS issue?