mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user