diff options
author | 2023-07-13 21:27:25 +0200 | |
---|---|---|
committer | 2023-07-13 21:27:25 +0200 | |
commit | 12b6cdcd8ce52269be5a1ca8acaae006896808b5 (patch) | |
tree | eba84aa522ba2ccbfb539930789a046630d03dae /internal/api/client.go | |
parent | [chore] Skip webfinger test on CI (#1983) (diff) | |
download | gotosocial-12b6cdcd8ce52269be5a1ca8acaae006896808b5.tar.xz |
[bugfix] Set Vary header correctly on cache-control (#1988)v0.10.0-rc2
* [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
Diffstat (limited to 'internal/api/client.go')
-rw-r--r-- | internal/api/client.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/api/client.go b/internal/api/client.go index 59fa0cf96..d9f131e3b 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -83,7 +83,10 @@ func (c *Client) Route(r router.Router, m ...gin.HandlerFunc) { apiGroup.Use(m...) apiGroup.Use( middleware.TokenCheck(c.db, c.processor.OAuthValidateBearerToken), - middleware.CacheControl("no-store"), // never cache api responses + middleware.CacheControl(middleware.CacheControlConfig{ + // Never cache client api responses. + Directives: []string{"no-store"}, + }), ) // for each client api module, pass it the Handle function |