mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 16:58:31 +02:00
reset favicon cache on route reload
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/yusing/go-proxy/internal/api/v1/favicon"
|
||||
"github.com/yusing/go-proxy/internal/common"
|
||||
"github.com/yusing/go-proxy/internal/docker"
|
||||
"github.com/yusing/go-proxy/internal/docker/idlewatcher"
|
||||
@@ -160,6 +161,8 @@ func (r *HTTPRoute) Start(parent task.Parent) E.Error {
|
||||
if common.PrometheusEnabled {
|
||||
r.task.OnCancel("metrics_cleanup", r.rp.UnregisterMetrics)
|
||||
}
|
||||
|
||||
r.task.OnCancel("reset_favicon", func() { favicon.ResetIconCache(r) })
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user