|
@@ -131,12 +131,15 @@ public class AuthGatewayFilterFactory extends AbstractGatewayFilterFactory<HostL
|
|
|
String auth = config.getAuth();
|
|
|
String protocol = config.getProtocol();
|
|
|
boolean isStaticFiles = isRequest4StaticFiles(requestUrl);
|
|
|
+ logger.info("AuthGatewayFilterFactory#apply(requestUrl = {}, isStaticFiles={} )", requestUrl, isStaticFiles);
|
|
|
if (auth == null || auth.isEmpty() || isStaticFiles) {
|
|
|
// 不需要授权
|
|
|
return chain.filter(exchange).then(Mono.fromRunnable(() -> {
|
|
|
proxyPass(config, null, exchange.getResponse().getHeaders(), exchange.getResponse());
|
|
|
if (isStaticFiles) {
|
|
|
- exchange.getResponse().getHeaders().set(HttpHeaders.CONTENT_TYPE, MimeTypes.getMimeType(tryGettingExtFromUrl(requestUrl)));
|
|
|
+ String contentType = MimeTypes.getMimeType(tryGettingExtFromUrl(requestUrl));
|
|
|
+ logger.info("AuthGatewayFilterFactory#apply(contentType = {})", contentType);
|
|
|
+ exchange.getResponse().getHeaders().set(HttpHeaders.CONTENT_TYPE, contentType);
|
|
|
}
|
|
|
}));
|
|
|
} else {
|