From a9d8179a4ba0a764310ab9a633d6cfb17b37aa5f Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 4 Jun 2018 00:57:35 -0500 Subject: [PATCH] allow /find for robots --- app/rest/api/migrator.go | 2 +- app/rest/api/rest.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rest/api/migrator.go b/app/rest/api/migrator.go index d21aa17f..a62b77d6 100644 --- a/app/rest/api/migrator.go +++ b/app/rest/api/migrator.go @@ -103,7 +103,7 @@ func (m *Migrator) importCtrl(w http.ResponseWriter, r *http.Request) { } // GET /export?site=site-id&secret=12345 -// exports all comments for siteID as json stream or gz file +// exports all comments for siteID as gz file func (m *Migrator) exportCtrl(w http.ResponseWriter, r *http.Request) { secret := r.URL.Query().Get("secret") diff --git a/app/rest/api/rest.go b/app/rest/api/rest.go index bcc0d4e8..c2e1fec8 100644 --- a/app/rest/api/rest.go +++ b/app/rest/api/rest.go @@ -166,7 +166,7 @@ func (s *Rest) routes() chi.Router { router.With(tollbooth_chi.LimitHandler(tollbooth.NewLimiter(10, nil))). Get("/robots.txt", func(w http.ResponseWriter, r *http.Request) { - render.PlainText(w, r, "User-agent: *\nDisallow: /auth/\nDisallow: /api/\n") + render.PlainText(w, r, "User-agent: *\nDisallow: /auth/\nDisallow: /api/\nAllow: /api/v1/find\n") }) // file server for static content from /web