Adding favicon
This commit is contained in:
parent
6a455a314f
commit
57a3bc4ecd
2 changed files with 3 additions and 0 deletions
BIN
client/favicon.ico
Normal file
BIN
client/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
|
|
@ -155,6 +155,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
fmt.Printf("%s - [%s] (%s) %s\n", time.Now().Format(time.RFC3339), r.RemoteAddr, r.Method, r.URL)
|
||||
|
||||
switch true {
|
||||
case r.Method == "GET" && r.URL.Path == "/favicon.ico":
|
||||
getStaticFile("./client/favicon.ico", "image/png", w)
|
||||
|
||||
case r.Method == "GET" && r.URL.Path == "/":
|
||||
getStaticFile("./client/index.html", "text/html", w)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue