From 6f8113b54277ad259c8efcaa754d40cd26508e77 Mon Sep 17 00:00:00 2001 From: Dongyeol Date: Sat, 10 Sep 2022 17:46:24 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=ED=99=94=EC=9D=B4=ED=8A=B8=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nhnacademy/marketgg/server/filter/SecurityFilter.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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);