diff --git a/src/main/java/store/itpick/backend/config/WebConfig.java b/src/main/java/store/itpick/backend/config/WebConfig.java index aea343c..1fc938d 100644 --- a/src/main/java/store/itpick/backend/config/WebConfig.java +++ b/src/main/java/store/itpick/backend/config/WebConfig.java @@ -44,11 +44,11 @@ public void addArgumentResolvers(List resolvers) @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOriginPatterns("http://localhost:3000/", "http://localhost:5173/", "https://localhost:5173/", + .allowedOriginPatterns("http://localhost:3000", "http://localhost:5173", "https://localhost:5173", "https://itpick.netlify.app") - .allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH") + .allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH","OPTIONS") .exposedHeaders("location", "Authorization") - .allowedHeaders("*") + .allowedHeaders("Content-Type", "Authorization", "X-Requested-With", "Accept") .allowCredentials(true); }