title: Laravel : add Cors header for static files
body: <p>I have a Laravel app, which was hosted on Apache, but now has been migrated on nginx. I'm a totally newbie with nginx.<br>
  On Apache I had this in my htaccess :</p>
  
  <p><code>&lt;IfModule mod_headers.c&gt;
  &lt;FilesMatch "\.(svg|ttf|otf|eot|woff|woff2)$"&gt;
      Header set Access-Control-Allow-Origin "*"
  &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;</code></p>
  
  <p>The new hosting provider does not allow custom nginx configuration.  </p>
  
  <p>Is it possible to add a Cors header (Access-Control-Allow-Origin: *) for static font files (extensions : svg|ttf|otf|eot|woff|woff2) in the Laravel app PHP code ? I tried (<a href="https://stackoverflow.com/questions/39429462/adding-access-control-allow-origin-header-response-in-laravel-5-3-passport">Adding Access-Control-Allow-Origin header response in Laravel 5.3 Passport</a>) without success, my guess is that static files are not targeted by that piece of code. Do you confirm ?  </p>
  
  <p>Is there a way to achieve this within my app's PHP code ?</p>
  
  <p>thanks</p>