]> git.ardis.lu - git.ardis.lu/commit
Add Cache-Control to response headers
authorArdis Lu <ardisglu@gmail.com>
Sat, 4 Apr 2026 08:04:29 +0000 (01:04 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sat, 4 Apr 2026 08:04:29 +0000 (01:04 -0700)
commit0812666fda3509ff38bdc0268c7848ec5090e039
tree26fbc1be9089c2dacb5077a5d26e1e462c0eed25
parent3d1d85fa5a0b8e03eff760e91de24cd41fad0b6c
Add Cache-Control to response headers

This header asks the requester to cache like this:

0-1 hour: serve cached page
1 hour-7 days: serve cached page and revalidate in the background
7 days+: get and serve fresh page (no cache)

Not all web browsers (e.g., Google Chrome) will respect this header. It is mainly for CDNs or other layers I may decide to put in front of Caddy later.
etc/caddy/Caddyfile
This page took 0.033509 seconds and 4 git commands to generate.