部分WAF动作输出内容时增加自定义报头

This commit is contained in:
刘祥超
2023-06-12 18:07:07 +08:00
parent a73b9f2674
commit c0909a2cd0
6 changed files with 22 additions and 3 deletions

View File

@@ -134,6 +134,7 @@ func (this *CaptchaAction) Perform(waf *WAF, group *RuleGroup, set *RuleSet, req
// 占用一次失败次数
CaptchaIncreaseFails(req, this, waf.Id, group.Id, set.Id, CaptchaPageCodeInit)
req.ProcessResponseHeaders(writer.Header(), http.StatusTemporaryRedirect)
http.Redirect(writer, req.WAFRaw(), CaptchaPath+"?info="+url.QueryEscape(info), http.StatusTemporaryRedirect)
return false, false