5秒盾支持例外URL和限制URL

This commit is contained in:
刘祥超
2023-03-06 21:49:11 +08:00
parent d835b36660
commit 22b945ec40
6 changed files with 272 additions and 1 deletions

View File

@@ -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)
}