• Resolved darnpunk

    (@darnpunk)


    Hi,

    I am encountering a CORS issue when loading fontawesome fonts. Images seems to load fine. I am using nginx, so not sure if this is a nginx problem or the CDN itself?

    The error I see in Chrome’s Developer console is something like below (removed the real domain and prefix):

    Access to font at 'https://SHIFTCDNPREFIX.wpcdn.shift8cdn.com/wp-content/themes/mytheme/assets/vendor/fontawesome/fonts/fa-regular-400.ttf' from origin 'https://my.domain.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, https://my.domain.com', but only one is allowed.

    Is there anyway we can choose which media type to use the CDN with? For example, only images.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author shift8

    (@shift8)

    Hmm.. this is an interesting problem.

    We should be adding the “Access-Control-Allow-Origin” header to all proxy requests to your origin site however – but your saying this is a server configuration on your server’s side that is blocking the request?

    I like the idea of giving options in the wordpress settings page to select which media you want included in the CDN. Alternatively you can add the CDN url to your access-control-allow-origin headers of your server? If I am misunderstanding please feel free to email the details for me to see the error to [email protected]

    I’ll look into the options to select which media either way because I see the benefit in your scenario to having that control. I’ll try my best to push out an update this week or early next week at the latest!

    Plugin Author shift8

    (@shift8)

    Hello,

    Modifications to our infrastructure have been made to interact with the headers being set in a more controlled way. I believe the Access-Control-Allow-Origin was not being cleared properly and/or was being appended to a previously set header (potentially).

    Now all requests through the CDN will have the Access-Control-Allow-Origin set to the origin URL.

    Please clear your browser cache and see if the CORS issue is still happening.

    Thank you!

    Plugin Author shift8

    (@shift8)

    I’m going to close this issue for now – please feel free to open a new issue if the CORS issue persists

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CORS Issue’ is closed to new replies.