服务支持自定义访客IP地址获取方式/对X-Real-IP等Header值进行有效性验证

This commit is contained in:
刘祥超
2021-10-06 11:40:48 +08:00
parent d0cf145f85
commit dc495c70b3
5 changed files with 33 additions and 10 deletions

View File

@@ -275,7 +275,7 @@ func (this *HTTPRequest) WAFRaw() *http.Request {
// WAFRemoteIP 客户端IP
func (this *HTTPRequest) WAFRemoteIP() string {
return this.requestRemoteAddr()
return this.requestRemoteAddr(true)
}
// WAFGetCacheBody 获取缓存中的Body