From 3772f8364e1c42fe12b61b92fa6aacd2c2df2116 Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 11 Jun 2018 13:20:56 -0500 Subject: [PATCH] add EOL to robots --- app/rest/api/rest.go | 2 +- app/rest/api/rest_public_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rest/api/rest.go b/app/rest/api/rest.go index 7e69c36a..848e2c99 100644 --- a/app/rest/api/rest.go +++ b/app/rest/api/rest.go @@ -172,7 +172,7 @@ func (s *Rest) routes() chi.Router { for i := range allowed { allowed[i] = "Allow: /api/v1" + allowed[i] } - render.PlainText(w, r, "User-agent: *\nDisallow: /auth/\nDisallow: /api/\n"+strings.Join(allowed, "\n")) + render.PlainText(w, r, "User-agent: *\nDisallow: /auth/\nDisallow: /api/\n"+strings.Join(allowed, "\n")+"\n") }) // file server for static content from /web diff --git a/app/rest/api/rest_public_test.go b/app/rest/api/rest_public_test.go index 27654b31..3e68c712 100644 --- a/app/rest/api/rest_public_test.go +++ b/app/rest/api/rest_public_test.go @@ -436,5 +436,5 @@ func TestRest_Robots(t *testing.T) { assert.Equal(t, 200, code) assert.Equal(t, "User-agent: *\nDisallow: /auth/\nDisallow: /api/\nAllow: /api/v1/find\n"+ "Allow: /api/v1/last\nAllow: /api/v1/id\nAllow: /api/v1/count\nAllow: /api/v1/counts\n"+ - "Allow: /api/v1/list\nAllow: /api/v1/config\nAllow: /api/v1/img\nAllow: /api/v1/avatar", string(body)) + "Allow: /api/v1/list\nAllow: /api/v1/config\nAllow: /api/v1/img\nAllow: /api/v1/avatar\n", string(body)) }