4

Even though I've added this in my .htaccess file:

Header add Access-Control-Allow-Origin "*"

And this in my apache config: (Inside a section AND outside)

<Files ~ "\.(gif|jpe?g|png|js|json|xml)$">
        Header set Access-Control-Allow-Origin "*"
</Files>

It still does not work!

When I get the DIRECTORY it does give me the wanted header, but as soon as I download a specific file the header is nowhere to be found!

How hard can it be?

skerit
  • 17,691
  • 22
  • 92
  • 138
  • http://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains may help. – sjas Feb 19 '16 at 12:19

1 Answers1

1

try

<FilesMatch "\.(gif|jpe?g|png|js|json|xml)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>
richie
  • 2,349
  • 2
  • 17
  • 21