Files
EdgeCommon/pkg/serverconfigs/http_cc_config.go

28 lines
648 B
Go
Raw Normal View History

2023-03-06 21:49:11 +08:00
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
2023-03-09 12:10:31 +08:00
//go:build !plus
2023-03-06 21:49:11 +08:00
package serverconfigs
2023-03-26 12:40:50 +08:00
// DefaultHTTPCCConfig 默认的CC配置
func DefaultHTTPCCConfig() *HTTPCCConfig {
return &HTTPCCConfig{}
}
2023-03-06 21:49:11 +08:00
// HTTPCCConfig HTTP CC防护配置
type HTTPCCConfig struct {
2023-03-09 12:10:31 +08:00
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖父级
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
2023-03-06 21:49:11 +08:00
}
func NewHTTPCCConfig() *HTTPCCConfig {
2023-03-09 12:10:31 +08:00
return &HTTPCCConfig{}
2023-03-06 21:49:11 +08:00
}
func (this *HTTPCCConfig) Init() error {
return nil
}
2023-03-09 12:10:31 +08:00
func (this *HTTPCCConfig) MatchURL(url string) bool {
return false
2023-03-06 21:49:11 +08:00
}