all repos — flounder @ 758676c26d0a87c9354a795aed370bc06b91be6b

A small site builder for the Gemini protocol

Add robots.txt for proxy

Ban all crawlers
alex wennerberg alex@alexwennerberg.com
Mon, 01 Feb 2021 21:52:23 -0800
commit

758676c26d0a87c9354a795aed370bc06b91be6b

parent

a5fcd4b6cc4016d4f6d474891200a9e14bc6a53e

2 files changed, 6 insertions(+), 0 deletions(-)

jump to
M proxy.goproxy.go

@@ -25,6 +25,10 @@ var spath []string

if r.URL.Path == "/" { http.Redirect(w, r, "gemini.circumlunar.space", http.StatusSeeOther) return + } else if r.URL.Path == "/robots.txt" { + temp := c.TemplatesDirectory + http.ServeFile(w, r, path.Join(temp, "proxy-robots.txt")) + return } else { spath = strings.SplitN(r.URL.Path, "/", 3) }
A templates/proxy-robots.txt

@@ -0,0 +1,2 @@

+User-agent: * +Disallow: /