|
@@ -51,8 +51,8 @@ public class AccessFilter extends ZuulFilter {
|
|
@Value("${pub.secret}")
|
|
@Value("${pub.secret}")
|
|
private String pubSecret;
|
|
private String pubSecret;
|
|
|
|
|
|
- @Value("${player.switch}")
|
|
|
|
- private String playerSwitch;
|
|
|
|
|
|
+ @Value("${interfaces.switch}")
|
|
|
|
+ private String interfacesSwitch;
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private UserDubboServiceClient userDubboServiceClient;
|
|
private UserDubboServiceClient userDubboServiceClient;
|
|
@@ -97,6 +97,9 @@ public class AccessFilter extends ZuulFilter {
|
|
if (StrUtil.endWith(servicePath,"/v2/api-docs")){
|
|
if (StrUtil.endWith(servicePath,"/v2/api-docs")){
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
+ if (StrUtil.equals("off",interfacesSwitch)){
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
Result<InterfacesDTO> interfacesDTOResult = operatingInterfacesDubboServiceClient.detailForGateway(servicePath);
|
|
Result<InterfacesDTO> interfacesDTOResult = operatingInterfacesDubboServiceClient.detailForGateway(servicePath);
|
|
if (!StringUtils.equals("200", interfacesDTOResult.getCode())) {
|
|
if (!StringUtils.equals("200", interfacesDTOResult.getCode())) {
|
|
ctx.setSendZuulResponse(false);
|
|
ctx.setSendZuulResponse(false);
|