Cross-Origin issue with multiple domains

I’m using a Multiple Domain Mapping on a single site:

With WPMU DEV CDN enabled assets are blocked by Cross-Origin policy, but only on the domains that are added as additional domains. There is no Cross-Origin issue on the main domain.

  • Ash
    • WordPress Hacker

    Hello Andy

    Would you please try the following code in the htaccess of your root?

    <FilesMatch "\.(ttf|otf|eot|woff)$">
    <IfModule mod_headers.c>
    SetEnvIf Origin "http(s)?://(www\.)?(|||$" AccessControlAllowOrigin=$0
    Header add Access-Control-AllowOrigin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin

    The code is considering as your additional domain.

    Then clear all types of cache and try again.

    Let us know how it goes.


  • Andy
    • WPMU DEV Initiate

    Hi, sorry for the delayed reply. i had used another method by changing my wordpress settings url to the new url. so it doesnt have this cross domain issue anymore.
    * Also, kindly remove my domain name from above if this is a public thread for privacy. thanks.

    thanks for the code too.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.