From c07b6ccc29360e62192237d727fb061772a66bb2 Mon Sep 17 00:00:00 2001 From: whitemark Date: Tue, 2 Apr 2024 00:24:54 +0900 Subject: [PATCH] [feature/#275] dev cors test --- .../main/java/com/inhabas/api/auth/config/CorsConfig.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module-auth/src/main/java/com/inhabas/api/auth/config/CorsConfig.java b/module-auth/src/main/java/com/inhabas/api/auth/config/CorsConfig.java index 7d4e04ce..d57e9d95 100644 --- a/module-auth/src/main/java/com/inhabas/api/auth/config/CorsConfig.java +++ b/module-auth/src/main/java/com/inhabas/api/auth/config/CorsConfig.java @@ -12,6 +12,11 @@ public class CorsConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/**").allowedOrigins("*").allowedMethods("*").allowedHeaders("*"); + registry + .addMapping("/**") + .allowedOrigins("https://dev.inhabas.com") + .allowedMethods("OPTIONS", "GET", "POST", "PUT", "DELETE") + .allowedHeaders("Authorization") + .maxAge(3600); } }