2022-01-06 16:27:39 +08:00
|
|
|
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
|
|
|
|
|
|
package checkpoints
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
|
|
|
|
|
"github.com/iwind/TeaGo/maps"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type RequestISPNameCheckpoint struct {
|
|
|
|
|
Checkpoint
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *RequestISPNameCheckpoint) IsComposed() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-16 17:05:37 +08:00
|
|
|
func (this *RequestISPNameCheckpoint) RequestValue(req requests.Request, param string, options maps.Map) (value interface{}, hasRequestBody bool, sysErr error, userErr error) {
|
2022-01-06 16:27:39 +08:00
|
|
|
value = req.Format("${isp.name}")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-16 17:05:37 +08:00
|
|
|
func (this *RequestISPNameCheckpoint) ResponseValue(req requests.Request, resp *requests.Response, param string, options maps.Map) (value interface{}, hasRequestBody bool, sysErr error, userErr error) {
|
2022-01-06 16:27:39 +08:00
|
|
|
return this.RequestValue(req, param, options)
|
|
|
|
|
}
|