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:
@@ -40,8 +40,11 @@ func (w *WellKnown) Route(r router.Router, m ...gin.HandlerFunc) {
|
||||
// attach middlewares appropriate for this group
|
||||
wellKnownGroup.Use(m...)
|
||||
wellKnownGroup.Use(
|
||||
// allow .well-known responses to be cached for 2 minutes
|
||||
middleware.CacheControl("public", "max-age=120"),
|
||||
// Allow public cache for 2 minutes.
|
||||
middleware.CacheControl(middleware.CacheControlConfig{
|
||||
Directives: []string{"public", "max-age=120"},
|
||||
Vary: []string{"Accept-Encoding"},
|
||||
}),
|
||||
)
|
||||
|
||||
w.nodeInfo.Route(wellKnownGroup.Handle)
|
||||
|
Reference in New Issue
Block a user