website

Personal website
git clone https://github.com/michaelneuper/website.git
README | Files | Log | Refs

commit 2aaa2d462bd3063d629896662710bb3db97b2160
parent d1abde64f8c5c4c9251022d30276a7399cb1398e
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Fri,  3 Nov 2023 16:57:07 +0200

Enable cache-control headers and gzip encoding

Diffstat:
Mnetlify.toml | 37++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/netlify.toml b/netlify.toml @@ -14,7 +14,38 @@ command = """\ """ [[headers]] +for = "/*.css" + [headers.values] + Cache-Control = "max-age=31536000" + +[[headers]] +for = "/*.js" + [headers.values] + Cache-Control = "max-age=31536000" + +[[headers]] +for = "/*.jpg" + [headers.values] + Cache-Control = "max-age=604800" + +[[headers]] +for = "/*.jpeg" + [headers.values] + Cache-Control = "max-age=604800" + +[[headers]] +for = "/*.png" + [headers.values] + Cache-Control = "max-age=604800" + +[[headers]] +for = "/*.gif" + [headers.values] + Cache-Control = "max-age=604800" + +[[headers]] for = "/*" -[headers.values] -Cache-Control = "max-age=3600" -# X-Content-Type-Options = "nosniff" + [headers.values] + Cache-Control = "max-age=3600" + X-Content-Type-Options = "nosniff" + Content-Encoding = "gzip"