fixed typos and formatting, fixed loading page not being shown (idlewaker)

This commit is contained in:
yusing
2024-10-08 13:15:23 +08:00
parent d1c9e18c97
commit 1797896fa6
6 changed files with 23 additions and 29 deletions

View File

@@ -64,7 +64,7 @@ func (w *Waker) wake(next http.HandlerFunc, rw http.ResponseWriter, r *http.Requ
defer cancel()
accept := gphttp.GetAccept(r.Header)
acceptHTML := r.Method == http.MethodGet && accept.AcceptHTML()
acceptHTML := (r.Method == http.MethodGet && accept.AcceptHTML() || r.RequestURI == "/" && accept.IsEmpty())
isCheckRedirect := r.Header.Get(headerCheckRedirect) != ""
if !isCheckRedirect && acceptHTML {