fix: Microsoft Edge captcha

#229 #112
This commit is contained in:
samwaf
2025-04-01 08:26:35 +08:00
parent 462fc8f7ae
commit ee1a0e40b6
3 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="theme-color" content="#000000" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="shortcut icon" type="image/ico" href="/samwaf_captcha/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/samwaf_captcha/css/gocaptcha.global.css">
<link rel="stylesheet" type="text/css" href="/samwaf_captcha/css/toastify.css">
+1 -1
View File
@@ -1 +1 @@
1.0.1
1.0.2
+3
View File
@@ -465,6 +465,9 @@ func (s *CaptchaService) VerifyCaptcha(w http.ResponseWriter, r *http.Request, c
func (s *CaptchaService) ShowCaptchaHomePage(w http.ResponseWriter, r *http.Request) {
// 设置内容类型
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "0")
// 从指定目录加载index.html
http.ServeFile(w, r, utils.GetCurrentDir()+"/data/captcha/index.html")