diff --git a/internal/web/router/router.go b/internal/web/router/router.go index 7c9ab3e..735c52d 100644 --- a/internal/web/router/router.go +++ b/internal/web/router/router.go @@ -135,6 +135,11 @@ func (s *service) initRouters(conf *model.Config, injector *do.Injector) *gin.En api := r.Group("/api/") s.setupApi(api, injector) + // do not allow crawling + r.GET("/robots.txt", func(c *gin.Context) { + c.String(http.StatusOK, "User-agent: *\nDisallow: /") + }) + // static files r.Use(static.Serve("/", static.LocalFile("./resource/frontend", true)))