CORS Error for FontAwesome Icons
Posted: Sat Jul 22, 2017 5:58 am
I'm trying to enable font awesome icons for my WordPress installation via CDN but I keep getting the following error for the fonts.
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
I've not had any success yet. Can someone point out the error here and guide me in resolving the same.
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.
Code: Select all
location ~* \.(eot|css|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}