mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-17 06:13:01 -06:00
[feature] Change instance-stats-randomize to instance-stats-mode with multiple options; implement nodeinfo 2.1 (#3734)
* [feature] Change `instance-stats-randomize` to `instance-stats-mode` with multiple options; implement nodeinfo 2.1 * swaggalaggadingdong
This commit is contained in:
parent
e1781ff52e
commit
07d2770995
18 changed files with 283 additions and 77 deletions
|
|
@ -36,9 +36,9 @@ func (w *NodeInfo) Route(r *router.Router, m ...gin.HandlerFunc) {
|
|||
// attach middlewares appropriate for this group
|
||||
nodeInfoGroup.Use(m...)
|
||||
nodeInfoGroup.Use(
|
||||
// Allow public cache for 2 minutes.
|
||||
// Allow public cache for 24 hours.
|
||||
middleware.CacheControl(middleware.CacheControlConfig{
|
||||
Directives: []string{"public", "max-age=120"},
|
||||
Directives: []string{"public", "max-age=86400"},
|
||||
Vary: []string{"Accept-Encoding"},
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue