Skip to content

Commit 06a923a

Browse files
committed
godoc: serve robots.txt raw
R=gri, niemeyer, rsc, r2, r CC=golang-dev https://golang.org/cl/4188063
1 parent 3173821 commit 06a923a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

robots.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow: /

src/cmd/godoc/godoc.go

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ func registerPublicHandlers(mux *http.ServeMux) {
9191
mux.Handle(pkgHandler.pattern, &pkgHandler)
9292
mux.HandleFunc("/doc/codewalk/", codewalk)
9393
mux.HandleFunc("/search", search)
94+
mux.Handle("/robots.txt", fileServer)
9495
mux.HandleFunc("/", serveFile)
9596
}
9697

0 commit comments

Comments
 (0)