WAF cc防护增加“检查请求来源指纹”选项

This commit is contained in:
GoEdgeLab
2023-03-10 10:41:16 +08:00
parent 86decd04cb
commit b0850b6032
2 changed files with 10 additions and 1 deletions

View File

@@ -404,6 +404,11 @@ func (this *HTTPRequest) WAFOnAction(action interface{}) (goNext bool) {
}
func (this *HTTPRequest) WAFFingerprint() []byte {
// 目前只有HTTPS请求才有指纹
if !this.IsHTTPS {
return nil
}
var requestConn = this.RawReq.Context().Value(HTTPConnContextKey)
if requestConn == nil {
return nil