KEYCLOAK-9028 Fix another NPE in Cors debug logging

This commit is contained in:
mposolda 2018-12-11 15:39:48 +01:00 committed by Marek Posolda
parent cea9e877ad
commit 10eb13854e

View file

@ -190,7 +190,7 @@ public class Cors {
if (!preflight && (allowedOrigins == null || (!allowedOrigins.contains(origin) && !allowedOrigins.contains(ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD)))) { if (!preflight && (allowedOrigins == null || (!allowedOrigins.contains(origin) && !allowedOrigins.contains(ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD)))) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debugv("Invalid CORS request: origin {0} not in allowed origins {1}", origin, Arrays.toString(allowedOrigins.toArray())); logger.debugv("Invalid CORS request: origin {0} not in allowed origins {1}", origin, allowedOrigins);
} }
return; return;
} }