mod_header is a apache module that permits to set HTTP header.
If you add the below code snippet in your htaccess file, you will set the following response header
<IfModule mod_headers.c>
# WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# WEEK
<FilesMatch "\.(js|css|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
Header set Access-Control-Allow-Origin "https://fiddle.jshell.net"
</IfModule>
Matching on path in a virtual host conf with the locationmatch directive
All path that starts with /lib/tpl/strap/
<VirtualHost *:80>
ServerName myhostname
...
<LocationMatch "^/lib/tpl/strap/">
Header set Cache-Control "max-age=604800, public"
</LocationMatch>
</VirtualHost>
You need to restart when you change a virtual host configuration
In Apache - Configuration (httpd.conf), you can load the module with:
LoadModule headers_module modules/mod_headers.so