• Hi there,

    I’m getting a cors error in my staging environment all relating to fonts. It looks like this “Access to font at ‘https://loadlink.ca/wp-content/uploads/fusion-gfonts/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2’ from origin ‘https://staging.loadlink.ca’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

    I tried adding this code to the .htaccess file to allow access to these files from other domains and I’m still getting the error. The code I’ve added is here listed below:

    <IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css)$">
    Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
    </IfModule>
    • This topic was modified 2 years, 10 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You added the .htaccess rule to the site which has the font file, right? Looks that way, just checking. It appears to be working now, there are no CORS errors due to font requests from the staging site page. There is a CORS error from a third party site but it’s not font related.

Viewing 1 replies (of 1 total)
  • The topic ‘wordpress files getting cors error on subdomain’ is closed to new replies.