X-Git-Url: http://git.scottworley.com/reliable-chat/blobdiff_plain/4565c41c58daff52300e281a4ac63cd73e9c660a..33fdb071377a6f84189ba1ac16f482b2b83b5b5e:/server/server.go diff --git a/server/server.go b/server/server.go index 1bb7c9a..574d2e1 100644 --- a/server/server.go +++ b/server/server.go @@ -156,6 +156,10 @@ const frame_html = ` ` +const robots_txt = `User-agent: * +Disallow: / +` + func start_server(store Store) { http.HandleFunc("/fetch", func(w http.ResponseWriter, r *http.Request) { var since time.Time @@ -195,6 +199,10 @@ func start_server(store Store) { w.Write([]byte(frame_html)); }) + http.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(robots_txt)); + }) + log.Fatal(http.ListenAndServe(":"+strconv.Itoa(*port), nil)) }