Commit 6090c3d8 authored by Matija Obreza's avatar Matija Obreza

Fix: Request Origin filter logging

parent 85defa2d
...@@ -103,21 +103,21 @@ public class OAuthClientOriginCheckFilter extends OncePerRequestFilter { ...@@ -103,21 +103,21 @@ public class OAuthClientOriginCheckFilter extends OncePerRequestFilter {
for (String allowedOrigin : allowedOrigins) { for (String allowedOrigin : allowedOrigins) {
if (reqOrigin != null && reqOrigin.startsWith(allowedOrigin)) { if (reqOrigin != null && reqOrigin.startsWith(allowedOrigin)) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Origin match: " + reqOrigin + " startsWith " + allowedOrigin); logger.debug("Origin match: " + reqOrigin + " for " + allowedOrigin);
} }
return true; return true;
} }
if (isGet && reqReferrer != null && reqReferrer.startsWith(allowedOrigin)) { if (isGet && reqReferrer != null && reqReferrer.startsWith(allowedOrigin)) {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Referrer match: " + reqReferrer + " startsWith " + allowedOrigin); logger.debug("Referrer match: " + reqReferrer + " for " + allowedOrigin);
} }
return true; return true;
} }
} }
// No declared origins match // No declared origins match
if (logger.isInfoEnabled()) { if (logger.isInfoEnabled()) {
logger.info("No origin/referrer match: " + reqOrigin + "/" + reqReferrer + " in " + allowedOrigins.toString()); logger.info("No origin/referrer match: " + reqOrigin + " or " + reqReferrer + " in " + allowedOrigins.toString());
} }
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment