Skip to content

Commit

Permalink
add robots.txt that blocks all crawlers (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Rob ODwyer <[email protected]>
  • Loading branch information
robbles and Rob ODwyer authored Dec 13, 2023
1 parent 930d771 commit 7d3882c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func NewServer() *Server {
mux.HandleFunc(pat.Get("/version"), handleVersion)
mux.HandleFunc(pat.Get("/healthz/alive"), handleAlive)
mux.HandleFunc(pat.Get("/healthz/ready"), handleReady)
mux.HandleFunc(pat.Get("/robots.txt"), func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "User-agent: *\nDisallow: /")
})

// Export routes
mux.HandleFunc(pat.Get("/avatars/*"), withCaching(handleAvatar))
Expand Down

0 comments on commit 7d3882c

Please sign in to comment.