WAF在输出内容时也加入自定义的响应报头

This commit is contained in:
GoEdgeLab
2023-06-11 10:46:20 +08:00
parent 4501e9c15d
commit f7dc03cbfb
23 changed files with 64 additions and 48 deletions

View File

@@ -57,7 +57,7 @@ func (this *HTTPRequest) writeCode(statusCode int, enMessage string, zhMessage s
return "${" + varName + "}"
})
this.processResponseHeaders(this.writer.Header(), statusCode)
this.ProcessResponseHeaders(this.writer.Header(), statusCode)
this.writer.WriteHeader(statusCode)
_, _ = this.writer.Write([]byte(pageContent))
@@ -110,7 +110,7 @@ func (this *HTTPRequest) write50x(err error, statusCode int, enMessage string, z
return "${" + varName + "}"
})
this.processResponseHeaders(this.writer.Header(), statusCode)
this.ProcessResponseHeaders(this.writer.Header(), statusCode)
this.writer.WriteHeader(statusCode)
_, _ = this.writer.Write([]byte(pageContent))