Add robots.txt for proxy Ban all crawlers
alex wennerberg alex@alexwennerberg.com
Mon, 01 Feb 2021 21:52:23 -0800
2 files changed,
6 insertions(+),
0 deletions(-)
M
proxy.go
→
proxy.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) }