update: remove white list

This commit is contained in:
hongqiaowei
2020-10-27 16:52:34 +08:00
parent 59396409e3
commit ac305b1ae7

View File

@@ -109,6 +109,9 @@ public class ApiConfigService {
@Autowired(required = false) @Autowired(required = false)
private CustomAuth customAuth; private CustomAuth customAuth;
@Value("${openServiceWhiteList:false}")
private boolean openServiceWhiteList = false;
@PostConstruct @PostConstruct
public void init() throws Throwable { public void init() throws Throwable {
@@ -262,8 +265,10 @@ public class ApiConfigService {
private Mono<Object> canAccess(ServerWebExchange exchange, String app, String ip, String timestamp, String sign, String secretKey, private Mono<Object> canAccess(ServerWebExchange exchange, String app, String ip, String timestamp, String sign, String secretKey,
String service, HttpMethod method, String path) { String service, HttpMethod method, String path) {
if (!whiteListSet.contains(service)) { // TODO XXX if (openServiceWhiteList) {
return Mono.just(Access.SERVICE_NOT_OPEN); if (!whiteListSet.contains(service)) { // TODO XXX
return Mono.just(Access.SERVICE_NOT_OPEN);
}
} }
ServiceConfig sc = serviceConfigMap.get(service); ServiceConfig sc = serviceConfigMap.get(service);
if (sc == null) { if (sc == null) {