Announcement

Collapse
No announcement yet.

FontAwesome blocked by CORS policy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FontAwesome blocked by CORS policy

    Started getting this error (unknown when)

    Access to font at 'https://www.domain.com/Merchant5/themes/base/fonts/fontawesome-webfont.woff?v=3.2.1' from origin 'https://domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    Tried setting permission via:

    <IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css)$" >
    Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
    </IfModule>

    Not working...icons still little boxes on a hillside.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    #2
    I have zero suggestions, but after my day today I very much appreciate the laugh!

    Comment


      #3
      I think font-awesome is now making their icons in svg format.

      It may be possible that the newer format got migrated to the deprecated 3.2.1 version.

      Just a guess, but try adding svg to your FilesMatch rule.


      http://www.alphabetsigns.com/

      Comment


        #4
        Good call. But to add to the oddity, it started working again (added that reference regardless).

        I suppose I should have mentioned that this is a ReadyTheme based site which is using the @import method of pulling in the fonts locally. I will probably just revert to calling font awesome directly. They have a new feature where you can call JUST the icons you need and have been wanting to try that out anyway.
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Just FYI, if you do need to serve that header, you should have TAC add it at the nginx level as those files may be served without the request making it to apache.
          David Hubbard
          CIO
          Miva
          [email protected]
          http://www.miva.com

          Comment


            #6
            Originally posted by ILoveHostasaurus View Post
            Just FYI, if you do need to serve that header, you should have TAC add it at the nginx level as those files may be served without the request making it to apache.
            Is that something that is done by default? This site is a Miva hosted site. Also, is there any reason that this directive could temporarily turn off? I ask because the site was working fine (and has been AFAIK for 2 years and never saw the issue until the other day for at least an hour while I tried to figure out a fix. (By the time I got any response, the site was working fine again.) Just curious.
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment


              #7
              We don't add that header by default. Could this have been some misconfiguration of www.domain vs domain?
              David Hubbard
              CIO
              Miva
              [email protected]
              http://www.miva.com

              Comment

              Working...
              X