update: remove white list
This commit is contained in:
@@ -109,6 +109,9 @@ public class ApiConfigService {
|
||||
@Autowired(required = false)
|
||||
private CustomAuth customAuth;
|
||||
|
||||
@Value("${openServiceWhiteList:false}")
|
||||
private boolean openServiceWhiteList = false;
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws Throwable {
|
||||
|
||||
@@ -262,9 +265,11 @@ public class ApiConfigService {
|
||||
private Mono<Object> canAccess(ServerWebExchange exchange, String app, String ip, String timestamp, String sign, String secretKey,
|
||||
String service, HttpMethod method, String path) {
|
||||
|
||||
if (openServiceWhiteList) {
|
||||
if (!whiteListSet.contains(service)) { // TODO XXX
|
||||
return Mono.just(Access.SERVICE_NOT_OPEN);
|
||||
}
|
||||
}
|
||||
ServiceConfig sc = serviceConfigMap.get(service);
|
||||
if (sc == null) {
|
||||
if (compatibleWh) {
|
||||
|
||||
Reference in New Issue
Block a user