fix: add default timeout and handle errors for HaveIBeenPwned API (#39316)

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
afishcalledwander
2026-09-16 20:41:57 +02:00
committed by GitHub
co-authored by silverwind wxiaoguang
parent 7ebb2caa9e
commit b2e11ddb37
9 changed files with 74 additions and 96 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ func IsViteDevMode() bool {
return false
}
req := httplib.NewRequest(viteDevServerBaseURL+"/web_src/js/__vite_dev_server_check", "GET")
req := httplib.NewClientRequest(http.MethodGet, viteDevServerBaseURL+"/web_src/js/__vite_dev_server_check")
resp, _ := req.Response()
if resp != nil {
_ = resp.Body.Close()