mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-23 23:30:25 +08:00
WAF在输出内容时也加入自定义的响应报头
This commit is contained in:
@@ -30,10 +30,10 @@ func (this *HTTPRequest) doRewrite() (shouldShop bool) {
|
||||
// 跳转
|
||||
if this.rewriteRule.Mode == serverconfigs.HTTPRewriteModeRedirect {
|
||||
if this.rewriteRule.RedirectStatus > 0 {
|
||||
this.processResponseHeaders(this.writer.Header(), this.rewriteRule.RedirectStatus)
|
||||
this.ProcessResponseHeaders(this.writer.Header(), this.rewriteRule.RedirectStatus)
|
||||
http.Redirect(this.writer, this.RawReq, this.rewriteReplace, this.rewriteRule.RedirectStatus)
|
||||
} else {
|
||||
this.processResponseHeaders(this.writer.Header(), http.StatusTemporaryRedirect)
|
||||
this.ProcessResponseHeaders(this.writer.Header(), http.StatusTemporaryRedirect)
|
||||
http.Redirect(this.writer, this.RawReq, this.rewriteReplace, http.StatusTemporaryRedirect)
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user