serve logo and favicon
This commit is contained in:
@@ -11,6 +11,16 @@ func ServeLoginPage(route string) {
|
||||
ServeWebpage(route, loginHandler)
|
||||
}
|
||||
|
||||
func EnableLogoRoute() {
|
||||
ServeWebpage("/logo", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "webserver/images/astraltech_logo.png")
|
||||
})
|
||||
|
||||
ServeWebpage("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "webserver/images/astraltech_favicon.png")
|
||||
})
|
||||
}
|
||||
|
||||
func ServeWebpage(url string, handler func(http.ResponseWriter, *http.Request)) {
|
||||
http.HandleFunc(url, handler)
|
||||
routes = append(routes, url)
|
||||
|
||||
Reference in New Issue
Block a user