<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_to_use_CDN_with_Webfonts_with_Magento</id>
		<title>How to use CDN with Webfonts with Magento - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_to_use_CDN_with_Webfonts_with_Magento"/>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_use_CDN_with_Webfonts_with_Magento&amp;action=history"/>
		<updated>2026-06-04T05:14:42Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_to_use_CDN_with_Webfonts_with_Magento&amp;diff=962&amp;oldid=prev</id>
		<title>Brian: /* Apache */</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_use_CDN_with_Webfonts_with_Magento&amp;diff=962&amp;oldid=prev"/>
				<updated>2018-10-05T21:42:20Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Apache&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:42, 5 October 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; # subdomains like &amp;quot;subdomain.example.com&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; # subdomains like &amp;quot;subdomain.example.com&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;lt;IfModule mod_headers.c&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;lt;IfModule mod_headers.c&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &lt;/del&gt;&amp;lt;FilesMatch &amp;quot;\.(ttf|ttc|otf|eot|woff|font.css|css)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;$&lt;/del&gt;&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &lt;/ins&gt;&amp;lt;FilesMatch &amp;quot;\.(ttf|ttc|otf|eot|woff&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|woff2&lt;/ins&gt;|font.css|css&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|js|html|json&lt;/ins&gt;)&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; Header set Access-Control-Allow-Origin &amp;quot;*&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; Header set Access-Control-Allow-Origin &amp;quot;*&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &lt;/del&gt;&amp;lt;/FilesMatch&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; Header set Access-Control-Allow-Headers &amp;quot;Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; Header set Access-Control-Allow-Methods &amp;quot;POST, GET, OPTIONS&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  &lt;/ins&gt;&amp;lt;/FilesMatch&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;lt;/IfModule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;lt;/IfModule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key briansne_wiki-wiki_:diff:version:1.11a:oldid:805:newid:962 --&gt;
&lt;/table&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_to_use_CDN_with_Webfonts_with_Magento&amp;diff=805&amp;oldid=prev</id>
		<title>Brian: Created page with &quot;==How to use CDN with Webfonts with Magento==  Enabled a CDN on your Magento store and your Fonts and CORs-enabled images not working correctly.  When using Webfonts via @font...&quot;</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_to_use_CDN_with_Webfonts_with_Magento&amp;diff=805&amp;oldid=prev"/>
				<updated>2014-10-04T02:23:42Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==How to use CDN with Webfonts with Magento==  Enabled a CDN on your Magento store and your Fonts and CORs-enabled images not working correctly.  When using Webfonts via @font...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==How to use CDN with Webfonts with Magento==&lt;br /&gt;
&lt;br /&gt;
Enabled a CDN on your Magento store and your Fonts and CORs-enabled images not working correctly.&lt;br /&gt;
&lt;br /&gt;
When using Webfonts via @font-face or other CSS3 methods, some browsers like Firefox and IE will refuse to embed the font when it’s coming from a 3rd party URL because it’s a security risk. The solution is very simple, just add a few lines in your .htaccess file to permanently solve the problem.  &lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Please add these lines to your .htaccess, preferably at the top:&lt;br /&gt;
&lt;br /&gt;
====Apache====&lt;br /&gt;
&lt;br /&gt;
 # ----------------------------------------------------------------------&lt;br /&gt;
 # CORS-enabled images (@crossorigin)&lt;br /&gt;
 # ----------------------------------------------------------------------&lt;br /&gt;
 # Send CORS headers if browsers request them; enabled by default for images.&lt;br /&gt;
 # developer.mozilla.org/en/CORS_Enabled_Image&lt;br /&gt;
 # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html&lt;br /&gt;
 # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/&lt;br /&gt;
 # wiki.mozilla.org/Security/Reviews/crossoriginAttribute&lt;br /&gt;
 &amp;lt;IfModule mod_setenvif.c&amp;gt;&lt;br /&gt;
  &amp;lt;IfModule mod_headers.c&amp;gt;&lt;br /&gt;
    # mod_headers, y u no match by Content-Type?!&lt;br /&gt;
    &amp;lt;FilesMatch &amp;quot;\.(gif|png|jpe?g|svg|svgz|ico|webp)$&amp;quot;&amp;gt;&lt;br /&gt;
      SetEnvIf Origin &amp;quot;:&amp;quot; IS_CORS&lt;br /&gt;
      Header set Access-Control-Allow-Origin &amp;quot;*&amp;quot; env=IS_CORS&lt;br /&gt;
    &amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
  &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
 # ----------------------------------------------------------------------&lt;br /&gt;
 # Webfont access&lt;br /&gt;
 # ----------------------------------------------------------------------&lt;br /&gt;
 # Allow access from all domains for webfonts.&lt;br /&gt;
 # Alternatively you could only whitelist your&lt;br /&gt;
 # subdomains like &amp;quot;subdomain.example.com&amp;quot;.&lt;br /&gt;
 &amp;lt;IfModule mod_headers.c&amp;gt;&lt;br /&gt;
  &amp;lt;FilesMatch &amp;quot;\.(ttf|ttc|otf|eot|woff|font.css|css)$&amp;quot;&amp;gt;&lt;br /&gt;
    Header set Access-Control-Allow-Origin &amp;quot;*&amp;quot;&lt;br /&gt;
  &amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Nginx====&lt;br /&gt;
&lt;br /&gt;
 location ~ \.(ttf|ttc|otf|eot|woff|font.css|css)$ {&lt;br /&gt;
           add_header Access-Control-Allow-Origin &amp;quot;*&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
After making those adjustments you will want to flush the CDN so that it picks up the new headers on the files with the Access-Control-Allow-Origin &amp;quot;*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Testing the Headers===&lt;br /&gt;
&lt;br /&gt;
Once you have added the above code to your .htaccess / configuration file you can test to verify the cdn has picked up the new headers.&lt;br /&gt;
&lt;br /&gt;
 curl -I http://&amp;lt;CDNforyourdomain&amp;gt;/path/to/object/&lt;br /&gt;
&lt;br /&gt;
You should see the follwoing in the headers:&lt;br /&gt;
&lt;br /&gt;
 Access-Control-Allow-Origin &amp;quot;*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you do not see that you will need to flush that object from the CDN so that it will pick up the new headers on the file.&lt;/div&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	</feed>