diff options
| author | Alexander Rakoczy <[email protected]> | 2021-10-24 19:20:08 -0400 |
|---|---|---|
| committer | Alexander Rakoczy <[email protected]> | 2021-10-24 19:20:08 -0400 |
| commit | 3eb2696f8e58c7dd9b0508da18b2e9b1353194f9 (patch) | |
| tree | 690c03dcfc4d98c320779f17468627e867775266 | |
| parent | eabf7efd61aeb2a1d75ea308c231e08691119439 (diff) | |
favicon finally
| -rw-r--r-- | cmd/server/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go index fbd1530..5998fb7 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -229,6 +229,9 @@ func home(w http.ResponseWriter, r *http.Request) { func fileServerHandler(fs fs.FS, next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/favicon.ico" { + r.URL.Path = "/static/favicon.ico" + } if !strings.HasPrefix(r.URL.Path, "/static") { next.ServeHTTP(w, r) return |
