diff --git a/backend/app/rest/api/rest_public.go b/backend/app/rest/api/rest_public.go index c2da73b3..efd86781 100644 --- a/backend/app/rest/api/rest_public.go +++ b/backend/app/rest/api/rest_public.go @@ -478,7 +478,7 @@ func (s *public) getStartedCtrl(w http.ResponseWriter, r *http.Request) { // GET /robots.txt func (s *public) robotsCtrl(w http.ResponseWriter, r *http.Request) { - allowed := []string{"/find", "/last", "/id", "/count", "/counts", "/list", "/config", + allowed := []string{"/find", "/last", "/id", "/count", "/counts", "/list", "/config", "/user", "/img", "/avatar", "/picture"} for i := range allowed { allowed[i] = "Allow: /api/v1" + allowed[i] diff --git a/backend/app/rest/api/rest_public_test.go b/backend/app/rest/api/rest_public_test.go index 8e79d7ea..27011443 100644 --- a/backend/app/rest/api/rest_public_test.go +++ b/backend/app/rest/api/rest_public_test.go @@ -722,7 +722,8 @@ 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\nAllow: /api/v1/picture\n", string(body)) + "Allow: /api/v1/list\nAllow: /api/v1/config\nAllow: /api/v1/user\nAllow: /api/v1/img\n"+ + "Allow: /api/v1/avatar\nAllow: /api/v1/picture\n", string(body)) } func TestRest_LastCommentsStream(t *testing.T) {