fix: 修复菜单和feign问题
This commit is contained in:
@@ -40,10 +40,11 @@ public class FeignRequestInterceptor implements RequestInterceptor {
|
||||
String authentication = headers.get(SecurityConstants.AUTHORIZATION_HEADER);
|
||||
if (StringUtils.isNotEmpty(authentication)) {
|
||||
Collection<String> headerValues = requestTemplate.headers().get(SecurityConstants.AUTHORIZATION_HEADER);
|
||||
boolean hasToken = headerValues.stream().anyMatch(c -> c.startsWith(SecurityConstants.PRE_ACCESS_TOKEN));
|
||||
boolean hasToken = headerValues != null && headerValues.stream().anyMatch(c -> c.startsWith(SecurityConstants.PRE_ACCESS_TOKEN));
|
||||
if (!hasToken) {
|
||||
requestTemplate.header(SecurityConstants.AUTHORIZATION_HEADER, authentication);
|
||||
}
|
||||
|
||||
}
|
||||
String language = headers.get(SecurityConstants.CONTENT_LANGUAGE);
|
||||
if (StringUtils.isNotEmpty(language)) {
|
||||
|
||||
Reference in New Issue
Block a user