From fa523a6ab95638e34f8052d0e243c9a95a0000be Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 9 Dec 2024 15:41:29 -0300 Subject: [PATCH] blossom: etag and cache-control headers. --- blossom/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blossom/handlers.go b/blossom/handlers.go index 6b8f5ed..8140d0a 100644 --- a/blossom/handlers.go +++ b/blossom/handlers.go @@ -198,6 +198,8 @@ func (bs BlossomServer) handleGetBlob(w http.ResponseWriter, r *http.Request) { if err == nil && descriptor != nil { t = descriptor.Uploaded.Time() } + w.Header().Set("ETag", hhash) + w.Header().Set("Cache-Control", "public, max-age=604800, immutable") http.ServeContent(w, r, hhash+ext, t, reader) return }