From cd3407413e8c56ab3d51368bb96cdff02bacad5e Mon Sep 17 00:00:00 2001 From: perennial Date: Wed, 4 Dec 2024 02:05:10 +1100 Subject: [PATCH] add note about ngx_brotli weakening etags --- server/routes/types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/routes/types.go b/server/routes/types.go index 6569b74..0e2a9c6 100644 --- a/server/routes/types.go +++ b/server/routes/types.go @@ -23,6 +23,7 @@ func RenderWithContentType[T any](w http.ResponseWriter, r *http.Request, conten } // Set strong ETag + // NOTE: the ngx_brotli nginx module appears to weaken strong ETags (even though gzipping is fine) w.Header().Set("ETag", `"`+etag+`"`) // As a default, set Cache-Control to no-cache, which allows revalidation via ETag