diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-07 01:44:17 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-07 01:44:17 +0200 |
commit | 6867c84defa2b6bb3a7eb7e2cff2be402a8a9777 (patch) | |
tree | 6ac54950a66d5eb58a89b8a081509826b8df73d2 | |
parent | 351c15d28e0444fd8a78c510a0c4d62ed433c758 (diff) |
Look for the favicon in /static
-rw-r--r-- | main.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -27,8 +27,10 @@ func main() { port := flag.Int("port", 8080, "port number") flag.Parse() + fs := http.FileServer(http.Dir("static")) mux := http.NewServeMux() - mux.Handle("GET /style.css", http.FileServer(http.Dir("static"))) + mux.Handle("GET /favicon.ico", fs) + mux.Handle("GET /style.css", fs) mux.Handle("GET /", middleware.I18n(http.HandlerFunc(finalHandler))) mux.Handle("POST /language", http.HandlerFunc(setUserLanguage)) |