mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-27 12:56:36 +08:00
找不到匹配的域名时可以指定默认域名、指定不匹配时的处理动作
This commit is contained in:
25
pkg/serverconfigs/domain_mismatch_action.go
Normal file
25
pkg/serverconfigs/domain_mismatch_action.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package serverconfigs
|
||||
|
||||
import "github.com/iwind/TeaGo/maps"
|
||||
|
||||
const (
|
||||
DomainMismatchActionPage = "page"
|
||||
DomainMismatchActionClose = "close"
|
||||
)
|
||||
|
||||
type DomainMismatchPageOptions struct {
|
||||
StatusCode int `yaml:"statusCode" json:"statusCode"`
|
||||
ContentHTML string `yaml:"contentHTML" json:"contentHTML"`
|
||||
}
|
||||
|
||||
type DomainMismatchCloseOptions struct {
|
||||
}
|
||||
|
||||
type DomainMismatchAction struct {
|
||||
Code string `yaml:"code" json:"code"` // 动作代号
|
||||
Options maps.Map `yaml:"options" json:"options"` // 动作选项
|
||||
}
|
||||
|
||||
func (this *DomainMismatchAction) Init() error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user