缓存任务:校验缓存Key时支持域名中含有星号通配符

This commit is contained in:
GoEdgeLab
2022-11-26 15:03:24 +08:00
parent 41e6525590
commit 547aecb317

View File

@@ -7,7 +7,7 @@ import (
"strings"
)
var cacheKeyDomainReg1 = regexp.MustCompile(`^(?i)(?:http|https)://([\w-.]+)`)
var cacheKeyDomainReg1 = regexp.MustCompile(`^(?i)(?:http|https)://([\w-.*]+)`) // 这里支持 *.example.com
var cacheKeyDomainReg2 = regexp.MustCompile(`^([\w-.]+)`)
// ParseDomainFromKey 从Key中获取域名