]> git.scottworley.com Git - reliable-chat/blobdiff - server/server.go
Multi-line input box
[reliable-chat] / 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))
 }