Skip to content

Commit

Permalink
支持同时多个DiscoveryEnabledStrategy的联合判断;支持网关动态选择子环境的功能;修复子环境过滤为判断元数据中的env…
Browse files Browse the repository at this point in the history
…为空的Bug
  • Loading branch information
HaojunRen committed Jan 1, 2020
1 parent ad0f254 commit 005670c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public class DiscoveryConstant {

public static final String N_D_VERSION = "n-d-version";
public static final String N_D_REGION = "n-d-region";
public static final String N_D_ENVIRONMENT = "n-d-env";
public static final String N_D_ADDRESS = "n-d-address";
public static final String N_D_VERSION_WEIGHT = "n-d-version-weight";
public static final String N_D_REGION_WEIGHT = "n-d-region-weight";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public boolean apply(Server server) {
return true;
}

String headerEnvironment = strategyContextHolder.getHeader(DiscoveryConstant.ENVIRONMENT);
String headerEnvironment = strategyContextHolder.getHeader(DiscoveryConstant.N_D_ENVIRONMENT);
// 传入headerEnvironment为空,返回true
if (StringUtils.isEmpty(headerEnvironment)) {
return true;
Expand Down

0 comments on commit 005670c

Please sign in to comment.