Files
EdgeNode/internal/waf/checkpoints/request_url.go

22 lines
689 B
Go
Raw Normal View History

2022-06-09 19:44:11 +08:00
package checkpoints
import (
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
"github.com/iwind/TeaGo/maps"
)
type RequestURLCheckpoint struct {
Checkpoint
}
2022-07-16 17:05:37 +08:00
func (this *RequestURLCheckpoint) RequestValue(req requests.Request, param string, options maps.Map) (value interface{}, hasRequestBody bool, sysErr error, userErr error) {
return req.Format("${requestURL}"), hasRequestBody, nil, nil
2022-06-09 19:44:11 +08:00
}
2022-07-16 17:05:37 +08:00
func (this *RequestURLCheckpoint) ResponseValue(req requests.Request, resp *requests.Response, param string, options maps.Map) (value interface{}, hasRequestBody bool, sysErr error, userErr error) {
2022-06-09 19:44:11 +08:00
if this.IsRequest() {
return this.RequestValue(req, param, options)
}
return
}