robots.txt
This commit is contained in:
4
res/static/robots.txt
Normal file
4
res/static/robots.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
User-Agent: *
|
||||||
|
Disallow: /res/
|
||||||
|
Disallow: /u/
|
||||||
|
Disallow: /l/
|
@@ -51,6 +51,7 @@ func New(r *httprouter.Router, prefix string, conf *conf.PixelWebConfig) *WebCon
|
|||||||
// General navigation
|
// General navigation
|
||||||
r.GET(p+"/" /* */, wc.serveTemplate("home", false))
|
r.GET(p+"/" /* */, wc.serveTemplate("home", false))
|
||||||
r.GET(p+"/favicon.ico" /* */, wc.serveFile("/favicon.ico"))
|
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+"/api" /* */, wc.serveTemplate("apidoc", false))
|
||||||
r.GET(p+"/history" /* */, wc.serveTemplate("history_cookies", false))
|
r.GET(p+"/history" /* */, wc.serveTemplate("history_cookies", false))
|
||||||
r.GET(p+"/u/:id" /* */, wc.serveFileViewer)
|
r.GET(p+"/u/:id" /* */, wc.serveFileViewer)
|
||||||
@@ -111,7 +112,7 @@ func (wc *WebController) serveFile(path string) httprouter.Handle {
|
|||||||
r *http.Request,
|
r *http.Request,
|
||||||
p httprouter.Params,
|
p httprouter.Params,
|
||||||
) {
|
) {
|
||||||
http.ServeFile(w, r, wc.staticResourceDir+"/favicon.ico")
|
http.ServeFile(w, r, wc.staticResourceDir+path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user