Hi there!
I'm trying to serve static files for a Django app from a PHP + Apache application, so that I can control CORS settings via the htaccess file. But I'm having trouble setting the Access-Control-Allow-Origin header correctly, and was hoping to get some help.
My goal is to serve fonts on a subdomain for this Django app, so to disable CORS for font files. I have done this before (on Webfaction), so I tried the contents of the .htaccess file that I had there:
<FilesMatch "\.(eot|svg|ttf|otf|woff|woff2)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
AddType font/eot .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType font/woff .woff
AddType font/woff2 .woff2
I also tried disabling it fully with the sole line Header set Access-Control-Allow-Origin "*"
. Neither worked for me.
Am I on the right track? Does the application need to be restarted? Is something I'm doing unsupported? Any help would be appreciated!
Michael