mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-15 02:37:27 +08:00
Add robots file
This commit is contained in:
parent
a552e19ec6
commit
70c4d33e6b
3
api.go
3
api.go
@ -37,6 +37,9 @@ func main() {
|
|||||||
})
|
})
|
||||||
r.HandleFunc("/p/{sessionId}", h).Methods("GET")
|
r.HandleFunc("/p/{sessionId}", h).Methods("GET")
|
||||||
r.PathPrefix("/assets").Handler(http.FileServer(http.Dir("./www")))
|
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)
|
r.Handle("/sessions/{sessionId}/ws/", server)
|
||||||
|
|
||||||
|
2
www/robots.txt
Normal file
2
www/robots.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
Loading…
x
Reference in New Issue
Block a user