optimize+bugfix: 优化 util.match.js
,简化配置,同时修复匹配错乱的问题。
#279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
optimize+bugfix: 优化
util.match.js
,简化配置,同时修复匹配错乱的问题。Optimize:简化配置说明:
配置
*.github.com
,可以同时匹配到一级(如:github.com
)和 多级(如:collect.github.com
)。配置
*github.com
,虽然也可以匹配到一级和多级域名,但也会匹配到其他域名,如:aaaa.xxxxgithub.com
。配置
*.github.com
,只能匹配多级(如:collect.github.com
),无法匹配到一级域名(如:github.com)。要想达到同时匹配一级和多级域名,必须配置两个:
github.com
和*.github.com
,比较麻烦。Bugfix:原来的逻辑匹配错乱的问题说明:
如配置
*.cn
,会匹配到xxx.cnet.com