mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-03 23:20:26 +08:00
增加注释
This commit is contained in:
@@ -35,6 +35,7 @@ func (this *HTTPRequest) doMismatch() {
|
|||||||
if sharedNodeConfig.GlobalServerConfig != nil && sharedNodeConfig.GlobalServerConfig.HTTPAll.MatchDomainStrictly {
|
if sharedNodeConfig.GlobalServerConfig != nil && sharedNodeConfig.GlobalServerConfig.HTTPAll.MatchDomainStrictly {
|
||||||
// 检查cc
|
// 检查cc
|
||||||
// TODO 可以在管理端配置是否开启以及最多尝试次数
|
// TODO 可以在管理端配置是否开启以及最多尝试次数
|
||||||
|
// 要考虑到服务在切换集群时,域名未生效状态时,用户访问的仍然是老集群中的节点,就会产生找不到域名的情况
|
||||||
if len(remoteIP) > 0 {
|
if len(remoteIP) > 0 {
|
||||||
const maxAttempts = 100
|
const maxAttempts = 100
|
||||||
if ttlcache.SharedCache.IncreaseInt64("MISMATCH_DOMAIN:"+remoteIP, int64(1), time.Now().Unix()+60, false) > maxAttempts {
|
if ttlcache.SharedCache.IncreaseInt64("MISMATCH_DOMAIN:"+remoteIP, int64(1), time.Now().Unix()+60, false) > maxAttempts {
|
||||||
|
|||||||
Reference in New Issue
Block a user