mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-10 01:20:58 +01:00
Added blank page handler, return blank html linking favicon
This commit is contained in:
parent
a594f9be98
commit
19b36c5adc
@ -278,3 +278,12 @@ func FaviconHandler(writer http.ResponseWriter, req *http.Request) {
|
|||||||
writer.Header().Set("Content-Type", "image/x-icon")
|
writer.Header().Set("Content-Type", "image/x-icon")
|
||||||
http.ServeContent(writer, req, "favicon.ico", time.Unix(0, 0), bytes.NewReader(favicon))
|
http.ServeContent(writer, req, "favicon.ico", time.Unix(0, 0), bytes.NewReader(favicon))
|
||||||
}
|
}
|
||||||
|
// Returns a blank page with favicon linked
|
||||||
|
func BlankHandler(writer http.ResponseWriter, res *http.Request) {
|
||||||
|
writer.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
|
io.WriteString(writer, `
|
||||||
|
<!doctype html><html><head>
|
||||||
|
<link rel="icon" href="/favicon.ico">
|
||||||
|
</head><body></body></html>
|
||||||
|
`)
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user