fix(idlewatcher): not started for docker containers

This commit is contained in:
yusing
2025-04-28 23:54:13 +08:00
parent c49016f22c
commit ce4bf2f646
2 changed files with 8 additions and 0 deletions

View File

@@ -38,6 +38,10 @@ func (w *Watcher) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
return
default:
f := &ForceCacheControl{expires: w.expires().Format(http.TimeFormat), ResponseWriter: rw}
w, ok := watcherMap[w.Key()] // could've been reloaded
if !ok {
return
}
w.rp.ServeHTTP(f, r)
}
}