Add debug logging when no CORS configuration
Closes gh-35314
This commit is contained in:
parent
f8823ddc11
commit
563dccbbda
|
@ -73,6 +73,9 @@ public class DefaultCorsProcessor implements CorsProcessor {
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
|
if (logger.isDebugEnabled() && CorsUtils.isCorsRequest(request)) {
|
||||||
|
logger.debug("Skip: no CORS configuration has been provided");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,11 +67,15 @@ public class DefaultCorsProcessor implements CorsProcessor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean process(@Nullable CorsConfiguration config, ServerWebExchange exchange) {
|
public boolean process(@Nullable CorsConfiguration config, ServerWebExchange exchange) {
|
||||||
|
ServerHttpRequest request = exchange.getRequest();
|
||||||
|
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
|
if (logger.isDebugEnabled() && CorsUtils.isCorsRequest(request)) {
|
||||||
|
logger.debug("Skip: no CORS configuration has been provided");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerHttpRequest request = exchange.getRequest();
|
|
||||||
ServerHttpResponse response = exchange.getResponse();
|
ServerHttpResponse response = exchange.getResponse();
|
||||||
HttpHeaders responseHeaders = response.getHeaders();
|
HttpHeaders responseHeaders = response.getHeaders();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue