Added /favicon.svg endpoint.
This commit is contained in:
parent
7a12928a56
commit
ca4391784a
@ -65,6 +65,7 @@ func main() {
|
|||||||
srv.GET("/filelist", hand.Filelist)
|
srv.GET("/filelist", hand.Filelist)
|
||||||
|
|
||||||
srv.GET("/robots.txt", hand.RobotsTxt)
|
srv.GET("/robots.txt", hand.RobotsTxt)
|
||||||
|
srv.GET("/favicon.svg", http.Favicon)
|
||||||
|
|
||||||
if !*noLiquidsoap {
|
if !*noLiquidsoap {
|
||||||
liquid, err := radio.NewLiquidsoap(config.Liquidsoap.ExecPath, config.Liquidsoap.ScriptPath)
|
liquid, err := radio.NewLiquidsoap(config.Liquidsoap.ExecPath, config.Liquidsoap.ScriptPath)
|
||||||
|
@ -109,3 +109,8 @@ func (h *Handlers) RobotsTxt(w http.ResponseWriter, _ *http.Request) {
|
|||||||
w.Header().Add("Content-Disposition", "attachment; filename=\"robots.txt\"")
|
w.Header().Add("Content-Disposition", "attachment; filename=\"robots.txt\"")
|
||||||
w.Write([]byte("User-agent: *\nDisallow: /assets/\nDisallow: /live/"))
|
w.Write([]byte("User-agent: *\nDisallow: /assets/\nDisallow: /live/"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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