907c7654

Author: Michael Lynch <git@mtlynch.io>

Committer: Michael Lynch <mtlynch@noreply.codeberg.org>

Add ETag caching and Cache-Control headers for static assets (#45)

Wrap the static file server with middleware that sets a Cache-Control
header (public, max-age=1800) and generates per-process ETag values
based on a SHA-256 hash of the startup timestamp and request path.
When the client sends a matching If-None-Match header, the server
responds with 304 Not Modified and an empty body.

Co-authored-by: Shelley <shelley@exe.dev>

Reviewed-on: https://codeberg.org/mtlynch/go-app-starter/pulls/45
Co-authored-by: Michael Lynch <git@mtlynch.io>
Co-committed-by: Michael Lynch <git@mtlynch.io>