From 12b6cdcd8ce52269be5a1ca8acaae006896808b5 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 13 Jul 2023 21:27:25 +0200 Subject: [bugfix] Set Vary header correctly on cache-control (#1988) * [bugfix] Set Vary header correctly on cache-control * Prefer activitypub types on AP endpoints * use immutable on file server, vary by range * vary auth on Accept --- internal/web/web.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/web/web.go') diff --git a/internal/web/web.go b/internal/web/web.go index b28aaa3bc..c53433730 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -91,7 +91,9 @@ func (m *Module) Route(r router.Router, mi ...gin.HandlerFunc) { // can still be served profileGroup := r.AttachGroup(profileGroupPath) profileGroup.Use(mi...) - profileGroup.Use(middleware.SignatureCheck(m.isURIBlocked), middleware.CacheControl("no-store")) + profileGroup.Use(middleware.SignatureCheck(m.isURIBlocked), middleware.CacheControl(middleware.CacheControlConfig{ + Directives: []string{"no-store"}, + })) profileGroup.Handle(http.MethodGet, "", m.profileGETHandler) // use empty path here since it's the base of the group profileGroup.Handle(http.MethodGet, statusPath, m.threadGETHandler) -- cgit v1.2.3