Added /favicon.svg endpoint.
This commit is contained in:
parent
ac92fe7d0b
commit
d7191d0fbd
@ -85,6 +85,7 @@ func main() {
|
|||||||
|
|
||||||
srv.SetNotFoundHandler(http.NotFound)
|
srv.SetNotFoundHandler(http.NotFound)
|
||||||
srv.GET("/robots.txt", http.RobotsTxt)
|
srv.GET("/robots.txt", http.RobotsTxt)
|
||||||
|
srv.GET("/favicon.svg", http.Favicon)
|
||||||
srv.ServeStatic("/assets/*filepath", hand.AssetsFS())
|
srv.ServeStatic("/assets/*filepath", hand.AssetsFS())
|
||||||
srv.GET("/", hand.Index)
|
srv.GET("/", hand.Index)
|
||||||
srv.POST("/", hand.Upload)
|
srv.POST("/", hand.Upload)
|
||||||
|
@ -225,3 +225,8 @@ func RobotsTxt(w http.ResponseWriter, r *http.Request) {
|
|||||||
data, _ := web.AssetsGetFile("robots.txt")
|
data, _ := web.AssetsGetFile("robots.txt")
|
||||||
w.Write(data)
|
w.Write(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Favicon(w http.ResponseWriter, r *http.Request) {
|
||||||
|
data, _ := web.AssetsGetFile("img/favicon.svg")
|
||||||
|
w.Write(data)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user