robots.txt

This commit is contained in:
2019-05-19 22:24:54 +02:00
parent 1d024d6a80
commit 5a3bdefbda
2 changed files with 6 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ func New(r *httprouter.Router, prefix string, conf *conf.PixelWebConfig) *WebCon
// General navigation
r.GET(p+"/" /* */, wc.serveTemplate("home", false))
r.GET(p+"/favicon.ico" /* */, wc.serveFile("/favicon.ico"))
r.GET(p+"/robots.txt" /* */, wc.serveFile("/robots.txt"))
r.GET(p+"/api" /* */, wc.serveTemplate("apidoc", false))
r.GET(p+"/history" /* */, wc.serveTemplate("history_cookies", false))
r.GET(p+"/u/:id" /* */, wc.serveFileViewer)
@@ -111,7 +112,7 @@ func (wc *WebController) serveFile(path string) httprouter.Handle {
r *http.Request,
p httprouter.Params,
) {
http.ServeFile(w, r, wc.staticResourceDir+"/favicon.ico")
http.ServeFile(w, r, wc.staticResourceDir+path)
}
}