找不到匹配的域名时可以指定默认域名、指定不匹配时的处理动作

This commit is contained in:
GoEdgeLab
2020-11-18 12:17:46 +08:00
parent 937000f1ea
commit b001883c54
3 changed files with 41 additions and 1 deletions

View File

@@ -195,6 +195,11 @@ func (this *ServerConfig) MatchName(name string) bool {
// 判断是否严格匹配
func (this *ServerConfig) MatchNameStrictly(name string) bool {
for _, serverName := range this.AliasServerNames {
if serverName == name {
return true
}
}
for _, serverName := range this.ServerNames {
if serverName.Name == name {
return true