client头解析失败不抛出异常

This commit is contained in:
cj committed 2020-05-28 18:24:19 +08:00
1 parent 8fc71b3eff
commit 6062f31223
4 files changed
+37 -21

No files matched your search

@@ -80,8 +80,8 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory {
// 终端设置不校验, 直接向下执行
try {
String header = request.getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
String clientId = WebUtils.getClientId(header);
if (filterIgnorePropertiesConfig.getClients().contains(clientId)) {
String clientId = WebUtils.extractClientId(header).orElse(null);
if (clientId != null && filterIgnorePropertiesConfig.getClients().contains(clientId)) {
return chain.filter(exchange);
}