mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-05-02 04:45:17 +08:00
5秒盾支持例外URL和限制URL
This commit is contained in:
@@ -103,3 +103,16 @@ func (this *HTTPHeaderConfig) Init() error {
|
||||
func (this *HTTPHeaderConfig) HasVariables() bool {
|
||||
return this.hasVariables
|
||||
}
|
||||
|
||||
// Match 判断是否匹配状态码
|
||||
func (this *HTTPHeaderConfig) Match(statusCode int) bool {
|
||||
if !this.IsOn {
|
||||
return false
|
||||
}
|
||||
|
||||
if this.Status == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return this.Status.Match(statusCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user