statichost.eu logo
Documentation

Custom headers

Site-wide headers are included in all plans, while headers based on path matching are included in our paid plans. Contact support in order to set up a paid plan.

If you need control over the HTTP headers on your site, you can do so via a _headers file placed in the root of your public folder. This file should contain a list of paths with a list of headers to include indented under that path:

Example _headers file:

*
    Cache-Control: public, max-age=60, must-revalidate
    X-Frame-Options: DENY
/iframe-page/
    X-Frame-Options: SAMEORIGIN
/static/*
    Cache-Control: public, max-age=3600
~/\.([a-f0-9]{6,8})(\.min)?\.(css|js)$/
    Cache-Control: public, immutable

Note that, for any given header value, the last matched occurence of that header is used.