mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Use X-Robots-Tag
headers to instruct scrapers/crawlers (#3737)
* [feature] Use `X-Robots-Tag` headers to instruct scrapers/crawlers * use switch for RobotsHeaders
This commit is contained in:
@@ -44,12 +44,5 @@ func ExtraHeaders() gin.HandlerFunc {
|
||||
//
|
||||
// See: https://github.com/patcg-individual-drafts/topics
|
||||
c.Header("Permissions-Policy", "browsing-topics=()")
|
||||
|
||||
// Some AI scrapers respect the following tags to opt-out
|
||||
// of their crawling and datasets.
|
||||
c.Header("X-Robots-Tag", "noimageai")
|
||||
// c.Header calls .Set(), but we want to emit the header
|
||||
// twice, not override it.
|
||||
c.Writer.Header().Add("X-Robots-Tag", "noai")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user