]> git.scottworley.com Git - reliable-chat/commitdiff
robots.txt: Disallow *
authorScott Worley <sworley@chkno.net>
Mon, 6 Aug 2012 05:15:57 +0000 (22:15 -0700)
committerScott Worley <sworley@chkno.net>
Mon, 6 Aug 2012 05:15:57 +0000 (22:15 -0700)
In the unlikely event that a robot ever finds this, disallow everything.

server/server.go

index 1bb7c9af81935b417692ddc55b717a2ff8f4967e..574d2e1bf27b70dceed64da09cc2fcfa6586b1ac 100644 (file)
@@ -156,6 +156,10 @@ const frame_html = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 </html>
 `
 
 </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
 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));
        })
 
                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))
 }
 
        log.Fatal(http.ListenAndServe(":"+strconv.Itoa(*port), nil))
 }