blossom: etag and cache-control headers.

This commit is contained in:
fiatjaf
2024-12-09 15:41:29 -03:00
parent abbe61d128
commit fa523a6ab9

View File

@@ -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
}