From d65542e8796c58c4cc0dde3f9f1d8a4594dcde16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=A4=80=ED=95=98?= Date: Wed, 7 Aug 2024 17:52:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EC=97=AD=20CORS=20=EC=9D=B8=ED=84=B0?= =?UTF-8?q?=EC=85=89=ED=84=B0=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/newCar/event_page/config/WebConfig.java | 2 +- src/main/java/newCar/event_page/controller/AdminController.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/newCar/event_page/config/WebConfig.java b/src/main/java/newCar/event_page/config/WebConfig.java index d7c5cc8..90934a1 100644 --- a/src/main/java/newCar/event_page/config/WebConfig.java +++ b/src/main/java/newCar/event_page/config/WebConfig.java @@ -27,7 +27,7 @@ public void addInterceptors(InterceptorRegistry registry) { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("*") + .allowedOriginPatterns("http://www.batro.org", "https://www.batro.org", "http://1.231.159.76", "https://1.231.159.76") .allowCredentials(true) .maxAge(3600); } diff --git a/src/main/java/newCar/event_page/controller/AdminController.java b/src/main/java/newCar/event_page/controller/AdminController.java index 804ef50..a9d39a4 100644 --- a/src/main/java/newCar/event_page/controller/AdminController.java +++ b/src/main/java/newCar/event_page/controller/AdminController.java @@ -16,7 +16,6 @@ @Tag(name = "admin API", description = "admin API 설계입니다") @RestController @RequestMapping("/admin") -@CrossOrigin(origins = {"http://www.batro.org", "https://www.batro.org", "http://1.231.159.76", "https://1.231.159.76"}, allowCredentials = "true") public class AdminController { private final AdminService adminService;