I’m having issues with ..Cross-Origin Resource Sharing policy: The 'Access-Control-Allow-Origin' header..
The site runs on 3 different domains using the WPML
plugin for 3 different languages. The references to e.g. the stylesheet URL point to 1 URL (the main domain) which means that 2 of the sites are requesting info cross domain and this is causing fonts not to load.
I’m hoping to solve this by removing the protocal and domain from the stylesheet URL’s, so that it’s pointing to a ‘relative’ path to the files (e.g. /wp-content/themes/salient/style.css?ver=4.8.1
)
Is there a way to change this in WordPress? Doesn’t just have to be for the stylesheet, it can be for all the files that are referenced by WordPress.
You can allow resources to be loaded from sub domain by adding following line to your .htaccess file
Load resources from sub-domain:
Load resources from all other domains:
Source: http://www.webspeaks.in/2015/01/wordpress-allow-cross-domain-resources.html