diff --git a/internal/api/v1/favicon/favicon.go b/internal/api/v1/favicon/favicon.go index cb03fa8..8084747 100644 --- a/internal/api/v1/favicon/favicon.go +++ b/internal/api/v1/favicon/favicon.go @@ -44,6 +44,12 @@ func GetFavIcon(w http.ResponseWriter, req *http.Request) { return } + // try with alias + GetFavIconFromAlias(w, req, alias) + return +} + +func GetFavIconFromAlias(w http.ResponseWriter, req *http.Request, alias string) { // try with route.Icon r, ok := routes.HTTP.Get(alias) if !ok { diff --git a/internal/idlewatcher/handle_http.go b/internal/idlewatcher/handle_http.go index 0c2f0e9..9c2d9f4 100644 --- a/internal/idlewatcher/handle_http.go +++ b/internal/idlewatcher/handle_http.go @@ -62,8 +62,7 @@ func (w *Watcher) wakeFromHTTP(rw http.ResponseWriter, r *http.Request) (shouldN // handle favicon request if isFaviconPath(r.URL.Path) { - r.URL.RawQuery = "alias=" + w.rp.TargetName - favicon.GetFavIcon(rw, r) + favicon.GetFavIconFromAlias(rw, r, w.route.Name()) return false }