Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #168209

    Well i had the exact problem, i using MAXcdn and the Enfold Theme, which looks great in nearly every Browser but not in Firefox.
    I was told by the Support team, that i should Base64 encrypt the Font file. which didn’t work @all. Thanks to the Support of MAXCDN i got a very easy solution, i wanted to share this with everybody who has the same Problem with Enfolds use of Webfonts.

    Just add this code, to your .htaccess file and your good to go

    # ----------------------------------------------------------------------
    # CORS-enabled images (@crossorigin)
    # ----------------------------------------------------------------------
    # Send CORS headers if browsers request them; enabled by default for images.
    # developer.mozilla.org/en/CORS_Enabled_Image
    # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
    # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
    # wiki.mozilla.org/Security/Reviews/crossoriginAttribute
    <IfModule mod_setenvif.c>
      <IfModule mod_headers.c>
        # mod_headers, y u no match by Content-Type?!
        <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
          SetEnvIf Origin ":" IS_CORS
          Header set Access-Control-Allow-Origin "*" env=IS_CORS
        </FilesMatch>
      </IfModule>
    </IfModule>
    # ----------------------------------------------------------------------
    # Webfont access
    # ----------------------------------------------------------------------
    # Allow access from all domains for webfonts.
    # Alternatively you could only whitelist your
    # subdomains like "subdomain.example.com".
    <IfModule mod_headers.c>
      <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    #168592

    Hey CooperDevon!

    Glad MAXcdn could provide a solution. I’ll tag this thread for the other support staff members in case someone else reports issues with the maxcdn service…

    Regards,
    Peter

    #168909

    Hey!

    Thanks for posting that :)

    Cheers!
    Kriesi

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Solution for FIREFOX Problem with Webfonts when using a CDN Subdomain’ is closed to new replies.