robots to rest

This commit is contained in:
Umputun
2017-12-30 13:55:09 -06:00
parent a93b3f0fa8
commit a1297322a8
2 changed files with 4 additions and 3 deletions
+4
View File
@@ -91,6 +91,10 @@ func (s *Server) Run() {
})
router.Get("/robots.txt", func(w http.ResponseWriter, r *http.Request) {
render.PlainText(w, r, "User-agent: *\nDisallow: /auth/\nDisallow: /api/\n")
})
s.addFileServer(router, "/web", http.Dir(filepath.Join(".", "web")))
log.Fatal(http.ListenAndServe(":8080", router))
-3
View File
@@ -1,3 +0,0 @@
User-agent: *
Disallow: /auth/
Disallow: /api/