mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 17:58:45 +02:00
refactor: fix incorrect logic introduced in previous commits and improve error handling
This commit is contained in:
@@ -38,6 +38,12 @@ func (w *Watcher) writeLoadingPage(rw http.ResponseWriter) error {
|
||||
data.LoadingPageCSSPath = idlewatcher.LoadingPageCSSPath
|
||||
data.LoadingPageJSPath = idlewatcher.LoadingPageJSPath
|
||||
data.WakeEventsPath = idlewatcher.WakeEventsPath
|
||||
|
||||
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
rw.Header().Set("Cache-Control", "no-cache")
|
||||
rw.Header().Add("Cache-Control", "no-store")
|
||||
rw.Header().Add("Cache-Control", "must-revalidate")
|
||||
rw.Header().Add("Connection", "close")
|
||||
err := loadingPageTmpl.Execute(rw, data)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user