Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 01, 2014 @ 13:28
    Fuji Kusaka
    0

    Access Control Allow Origin

    Has anyone ever make use of  Access-Control-Allow-Origin in web.config for webfonts using cdn ?

    Since webfonts doesnt work properly with IE & FF when using CDN, i made some changes to the web.config but nothing happens. Here is how my code looks like, any thought on this ?

    <outboundRules>
            <rule name="Add Cross Origin Access" stopProcessing="true">
              <match serverVariable="RESPONSE_Access_Control_Allow_Origin" pattern=".*" />
              <conditions>
                <add input="{REQUEST_URI}" pattern=".*\.(ttf|otf|eot|woff|svg)\?*.*$" />
              </conditions>
              <action type="Rewrite" value="*"/>
            </rule>
          </outboundRules>
  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 02, 2014 @ 09:46
    Fuji Kusaka
    0

    Anyone has an idea how to achiev this ?

    Did try adding http protocal as well but no success

     <httpProtocol>
          <customHeaders>
            <add name="Access-Control-Allow-Origin" value="*" />
            <add name="Access-Control-Allow-Headers" value="Content-Type" />
          </customHeaders>
        </httpProtocol>
  • Fuji Kusaka 2203 posts 4220 karma points
    Oct 28, 2014 @ 03:28
    Fuji Kusaka
    100

    Got this working if someone needs help on this its something to do with cp rackspace. each individual fonts need to be configured

  • Gordon 21 posts 42 karma points
    Jun 22, 2015 @ 09:22
    Gordon
    0

    Hi Fuji

    Could you possibly post up an example of how you did this?

    Regards

    Gordon

  • Fuji Kusaka 2203 posts 4220 karma points
    Jun 22, 2015 @ 09:57
    Fuji Kusaka
    0

    Hey Gordon,

    yes sure, this is how i configured my files in rackspace.

    Access-Control-Allow-Origin  http://www.mydomain.com/
    Content-Encoding  "x-auth-token"
    Content-Type  application/x-www-form-urlencoded;charset=utf-8
    Origin   https://mycloud.rackspace.co.uk
    

    In my css file ive used https;//cdn.com/fontname.eot ...

    Hope this helps.

    Fuji

Please Sign in or register to post replies

Write your reply to:

Draft