title: Font-Awesome has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
body: <p>Here's a new take on a common problem.</p>
  <p>So I have a plesk hosting, with a SSL on wildcard domains.
  I have a wordpress theme which is using Font-Awesome icons, hosted on the same server.
  I have added the following lines to my /httpdocs/.htaccess file, at the very top:</p>
  <pre><code>&lt;IfModule mod_headers.c&gt;
    &lt;FilesMatch &quot;\.(ttf|ttc|otf|eot|woff|woff2|font.css|css)$&quot;&gt;
      Header set Access-Control-Allow-Origin &quot;*&quot;
    &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;
  </code></pre>
  <p>I use the polylang translation plugin, which is set to use subdomain for different language:</p>
  <ul>
  <li>mysite.com (English)</li>
  <li>fr.mysite.com (French)</li>
  </ul>
  <p>When I access example.com, everything works fine.
  When I access fr.example.com, I get a lot of the following errors in the console:</p>
  <pre><code>Access to font at 'https://example.com/wp-content/plugins/elementor/assets/lib/font-awesome/webfonts/fa-brands-400.woff2' from origin 'https://fr.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  </code></pre>
  <p>I was expecting the error to go away by adding the Header set lines to my .htaccess but it does not seem to help at all. According to Plesk I do have the Headers module activated.</p>
  <p>I do use NGINX as a proxy to Apache, all with default configs. I did try to add the following lines, just in case, but all 3 attempts lead to Error 500:</p>
  <pre><code>#NGINX &lt; 1.4
   if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
      add_header Access-Control-Allow-Origin *;
   }
  
  # NGINX 1.4
  location ~* \.(eot|ttf|woff|woff2)$ {
      add_header Access-Control-Allow-Origin *;
  }
  
  # NGINX &gt; 1.6
  if ($request_uri ~* ^.*?\.(eot)|(ttf)|(woff)$) {
      add_header Access-Control-Allow-Origin *;
  }
  </code></pre>
  <p>I also tried to add this in the .htaccess without success:</p>
  <pre><code>Header set Access-Control-Allow-Origin &quot;*&quot;
  </code></pre>
  <p>It almost seem as the .htaccess is not being loaded, but then the rewrite rules and the caching headers from WP-Optimize works fine and are from the same file.</p>
  <p>Any idea what I am doing wrong ?</p>