From 70c4d33e6b77b40760ab8e66efe1d8bdd6062b7d Mon Sep 17 00:00:00 2001 From: "Jonathan Leibiusky @xetorthio" Date: Tue, 15 Nov 2016 14:58:11 -0300 Subject: [PATCH] Add robots file --- api.go | 3 +++ www/robots.txt | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 www/robots.txt diff --git a/api.go b/api.go index 1e2c7c7..fc652d7 100644 --- a/api.go +++ b/api.go @@ -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) diff --git a/www/robots.txt b/www/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/www/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /