Access Control Allow Origin error with Wordpress subdomain

kurosaki4d

Power Member
Joined
Apr 24, 2018
Messages
694
Reaction score
83
Hello,

I'm facing a problem with my wordpress website, it has a subdomain, blog.domain.com, when i access the blog i get the following error in my console:

Access to font at 'www.domain.com/wp-content/themes/Divi/core/admin/fonts/modules.ttf' from origin 'blog.domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Currently my website is hosted in Azure, i tried activating the option "Cross-Origin Resource Sharing - Cors" in the my hosting options, it solved the issue, but it made the website a lot slower (16 sec), so i'm looking for an alternative to this issue.

If anyone have any idea how i can resolve to this, i am opened to suggestions, i would appreciate it !

Thanks
 
That's odd, are you sure it's not just slower now because you are now loading the blocked resource?
 
That's odd, are you sure it's not just slower now because you are now loading the blocked resource?

Thank you for your reply, the blocked ressources you are asking me about are just simple icons, sometimes there aren't any in the subdomain pages, but just the fact that the module.ttf file was loaded successfully thanks to the "CORS" feature, makes the website a lot slower !

I don't understand why all the other ressources are loaded just fine in the subdomain except for this particular file module.ttf ? (when i checked in the css file i found that it was using just a relative path which should normaly work in a subdomain, right ?
 
Back
Top