1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-13 17:42:53 +08:00

Add robots file

This commit is contained in:
Jonathan Leibiusky @xetorthio 2016-11-15 14:58:11 -03:00
parent a552e19ec6
commit 70c4d33e6b
2 changed files with 5 additions and 0 deletions

3
api.go
View File

@ -37,6 +37,9 @@ func main() {
})
r.HandleFunc("/p/{sessionId}", h).Methods("GET")
r.PathPrefix("/assets").Handler(http.FileServer(http.Dir("./www")))
r.HandleFunc("/robots.txt", http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
http.ServeFile(rw, r, "www/robots.txt")
}))
r.Handle("/sessions/{sessionId}/ws/", server)

2
www/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /