github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/checkpoints/request_args.go (about) 1 package checkpoints 2 3 import ( 4 "github.com/TeaOSLab/EdgeNode/internal/waf/requests" 5 "github.com/TeaOSLab/EdgeNode/internal/waf/utils" 6 "github.com/iwind/TeaGo/maps" 7 ) 8 9 type RequestArgsCheckpoint struct { 10 Checkpoint 11 } 12 13 func (this *RequestArgsCheckpoint) RequestValue(req requests.Request, param string, options maps.Map, ruleId int64) (value any, hasRequestBody bool, sysErr error, userErr error) { 14 value = req.WAFRaw().URL.RawQuery 15 return 16 } 17 18 func (this *RequestArgsCheckpoint) ResponseValue(req requests.Request, resp *requests.Response, param string, options maps.Map, ruleId int64) (value any, hasRequestBody bool, sysErr error, userErr error) { 19 if this.IsRequest() { 20 return this.RequestValue(req, param, options, ruleId) 21 } 22 return 23 } 24 25 func (this *RequestArgsCheckpoint) CacheLife() utils.CacheLife { 26 return utils.CacheMiddleLife 27 }