From 3f7b1bae50edb77c41cc176b7f79e7019dd60bcd Mon Sep 17 00:00:00 2001 From: Niko Abeler Date: Wed, 9 Aug 2023 19:16:17 +0200 Subject: [PATCH] disallow GPT in robots.txt --- web/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app.go b/web/app.go index debcfb5..1b35b10 100644 --- a/web/app.go +++ b/web/app.go @@ -117,7 +117,7 @@ func NewWebApp( configRepo.Get(config.SITE_CONFIG, &siteConfig) sitemapUrl, _ := url.JoinPath(siteConfig.FullUrl, "/sitemap.xml") 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 app.Get("/sitemap.xml", NewSiteMapHandler(entryService, configRepo).Handle)