disallow GPT in robots.txt
This commit is contained in:
parent
5939bbd09d
commit
3f7b1bae50
|
@ -117,7 +117,7 @@ func NewWebApp(
|
||||||
configRepo.Get(config.SITE_CONFIG, &siteConfig)
|
configRepo.Get(config.SITE_CONFIG, &siteConfig)
|
||||||
sitemapUrl, _ := url.JoinPath(siteConfig.FullUrl, "/sitemap.xml")
|
sitemapUrl, _ := url.JoinPath(siteConfig.FullUrl, "/sitemap.xml")
|
||||||
c.Set("Content-Type", "text/plain")
|
c.Set("Content-Type", "text/plain")
|
||||||
return c.SendString(fmt.Sprintf("User-agent: *\nAllow: /\n\nSitemap: %s\n", sitemapUrl))
|
return c.SendString(fmt.Sprintf("User-agent: GPTBot\nDisallow: /\n\nUser-agent: *\nAllow: /\n\nSitemap: %s\n", sitemapUrl))
|
||||||
})
|
})
|
||||||
// sitemap.xml
|
// sitemap.xml
|
||||||
app.Get("/sitemap.xml", NewSiteMapHandler(entryService, configRepo).Handle)
|
app.Get("/sitemap.xml", NewSiteMapHandler(entryService, configRepo).Handle)
|
||||||
|
|
Loading…
Reference in New Issue