mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 18:12:25 -05:00
[feature] Use ETag for robots.txt to prevent mishaps (#3829)
* [feature] Use ETag for robots.txt to prevent mishaps * check incoming if-none-match header
This commit is contained in:
parent
c9de6c9a1e
commit
fd670c6a27
3 changed files with 26 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ func (rb *Robots) Route(r *router.Router, m ...gin.HandlerFunc) {
|
|||
// https://www.rfc-editor.org/rfc/rfc9309.html#section-2.4
|
||||
robotsGroup.Use(
|
||||
middleware.CacheControl(middleware.CacheControlConfig{
|
||||
Directives: []string{"public", "max-age=86400"},
|
||||
Directives: []string{"public", "no-cache"},
|
||||
Vary: []string{"Accept-Encoding"},
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue