mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-28 02:50:25 +08:00
WAF在输出内容时也加入自定义的响应报头
This commit is contained in:
@@ -82,8 +82,10 @@ func (this *BlockAction) Perform(waf *WAF, group *RuleGroup, set *RuleSet, reque
|
||||
|
||||
// output response
|
||||
if this.StatusCode > 0 {
|
||||
request.ProcessResponseHeaders(writer.Header(), this.StatusCode)
|
||||
writer.WriteHeader(this.StatusCode)
|
||||
} else {
|
||||
request.ProcessResponseHeaders(writer.Header(), http.StatusForbidden)
|
||||
writer.WriteHeader(http.StatusForbidden)
|
||||
}
|
||||
if len(this.URL) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user