I'm trying to use mod_headers to set a header for certain file types. Specifically, I want to set Access-Control-Allow-Origin
to "*"
for ttf
files. Is there a rule I can add to my VirtualHost that will do this for me?
Httpd – Set header for certain file types using Apache2 mod_headers
apache-2.2httpd
Related Topic
- Freebsd – Header set Access-Control-Allow-Origin not working with mod_rewrite + mod_jk
- Restricting access using the X-Forwarded-For header in Apache
- Linux Web Server – Proper Permissions for Website Files and Folders
- Php – mod_headers not sending headers when file is PHP
- Add a request header on mod_proxy based on the value of another request header
- Htaccess conditional header set is ignoring the condition
Best Answer
You can use the
<Files>
tag to do this (docs), i.e.:This will restrict the
Header
to only files ending in.ttf
. Hope this helps!