Hello @rijans
I am sorry about the issue you are experiencing and I am happy to assist you with this.
Yes, I can see the cors header error on your website. This is related mostly with the configuration on the AWS.
What you should do si to check your AWS configuration and CORS configuration. It should have:
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
As I can see, the server is nginx based so you should add the following rule to your nginx.conf:
location ~* \.(eot|otf|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
YOu should also make sure to whitelist origin: Access-Control-Allow-Origin
I hope this helps!
Thanks!
What you mean by “AWS configuration”? AWS is a big thing, collection of hundreds of services.
Tell me how do I do that in cloudfront?
How do I add
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
in AWS Cloudfront? can you guide me? because I didn’t find that in cloudfront.
Anyway, I have done everything in
https://stackoverflow.com/questions/39247055/cross-origin-resource-sharing-policy-font
and
https://aws.amazon.com/premiumsupport/knowledge-center/no-access-control-allow-origin-error/
and cleared cache several times.
still the problem is persisting.
can you or anyone check my site mypihr.com?
Hello @rijans
Thank you for the information.
In the Performance>CDN>Aadvanced, there is a setting “Add CORS header” which does exactly that.
If you also added the mentioned nginx rule and followed the instructions here:
https://stackoverflow.com/questions/39247055/cross-origin-resource-sharing-policy-font
Then everything is done when it comes to W3 Total Cache.
SO you should reach out to Cloudfront support for more assistance.
I am able to download the file from https://d1n76nzjnhn08o.cloudfront.net/wp-content/themes/Divi/core/admin/fonts/modules.woff
This means that the file is uploaded to the CDN. I am not seeing any cors issue on mypihr.com, however, https://www.durbintracker.com/ is still showing the issue.
The only thing that I can suggest when it comes to W3 Total Cache is to add those files to rejected files list and therefore do not upload them to the CDN.
SO you can add those files to Performance>CDN>Advanced>Rejected Files list:
/wp-content/themes/Divi/core/admin/fonts/modules.ttf
/wp-content/themes/Divi/core/admin/fonts/modules.woff
Again everything is setup properly when it comes to W3 Total Cache. And you should reach out to Cloudfront support for more assistance.
Thanks!
Actually I did everything you mentioned, and also configured my Plesk Server’s nginx and Apache directives.
Still fonts making problem.
I blacklisted fonts, blacklisted ur urls. I guess you plugin has a bug, where it still calling fonts from CDN, instead of loca, even after blacklist.
They still appear if I disable w3 Cache plugin. Looks like they are hardcoded on the site. Not using any other cache plugin.
Is there anyway to fully reset everything of W3 Total Cache?
Is it possible that your access my site durbintracker.com and check the issue?
Well, I was able to completely uninstall W3 Cache and it’s configs, settings and then new install and new start. Then I configured cdn and placklisted ttf, then again the errors coming, so the plugin is not really blacklisting ttf etc 🙁
CORS Solutions didn’t work
Blacklist fonts don’t work too.
OMG.
If you guys think you can directly help or access my site, I would love that.
Hello @rijans
Thank you for the information.
First, this is not a bug in W3 Total Cache but the problem with the cors settings on CloudFront. As advised you should reach out to AWS support about this.
Can you please share the screenshot of the Performance>CDN so we can check the settings?
Please do not ask anyone to login to your website as this is against the wp.org rules. This forum is for free support.
To get the premium support you can contact us directly via the plugin in Performance>Support.
Thanks!