From 15b15133e0c461cc868ea761c4128edc7e81e0cc Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 20 Jun 2020 18:27:16 +0200 Subject: [PATCH] add robots.txt --- cmd/qrbill-api/api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/qrbill-api/api.go b/cmd/qrbill-api/api.go index 9814e01..be634c1 100644 --- a/cmd/qrbill-api/api.go +++ b/cmd/qrbill-api/api.go @@ -154,6 +154,12 @@ func logic() error { } }) + mux.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, `User-agent: * +Disallow: / +`) + }) + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { if r.URL.Path != "/" { http.Error(w, "not found", http.StatusNotFound)