From 254f5edf9c91aba9c9282eaf731962fe3f66286b Mon Sep 17 00:00:00 2001 From: 0702Yoon Date: Tue, 20 Aug 2024 11:51:14 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20cors=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=EB=A5=BC=20=EB=B0=A9=EC=A7=80=ED=95=9C=20=EC=99=80=EC=9D=BC?= =?UTF-8?q?=EB=93=9C=20=EC=B9=B4=EB=93=9C=20=EB=8F=84=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/bigbrotherbe/global/filter/CustomerCorsFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/bigbrotherbe/global/filter/CustomerCorsFilter.java b/src/main/java/com/example/bigbrotherbe/global/filter/CustomerCorsFilter.java index 1088e61..ea89379 100644 --- a/src/main/java/com/example/bigbrotherbe/global/filter/CustomerCorsFilter.java +++ b/src/main/java/com/example/bigbrotherbe/global/filter/CustomerCorsFilter.java @@ -37,7 +37,7 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) // CORS 허용한 Origin response.setHeader("Access-Control-Allow-Credentials", "true"); // 자격이 포함된 요청 받기 - response.setHeader("Access-Control-Allow-Methods","*"); + response.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS"); // http 메서드 전체 다 허용 response.setHeader("Access-Control-Max-Age", "3600"); // 프리플라이트(preflight) 요청의 캐시 시간을 정의합니다.