diff --git a/src/main/java/com/nhnacademy/marketgg/server/filter/SecurityFilter.java b/src/main/java/com/nhnacademy/marketgg/server/filter/SecurityFilter.java index d01d8ad6..445df685 100644 --- a/src/main/java/com/nhnacademy/marketgg/server/filter/SecurityFilter.java +++ b/src/main/java/com/nhnacademy/marketgg/server/filter/SecurityFilter.java @@ -36,9 +36,10 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo if (Objects.nonNull(xForwardedFor)) { log.warn("Origin: {}", xForwardedFor); log.warn("URI: {}", request.getRequestURI()); - // if (!Objects.equals(xForwardedFor, gatewayUrl)) { - // response.sendError(HttpStatus.FORBIDDEN.value()); - // } + if (!Objects.equals(xForwardedFor, gatewayUrl)) { + log.info("!Objects.equals(xForwardedFor, gatewayUrl): {}", !Objects.equals(xForwardedFor, gatewayUrl)); + response.sendError(HttpStatus.FORBIDDEN.value()); + } } filterChain.doFilter(servletRequest, servletResponse);