feat: user cors에러 수정

This commit is contained in:
박정민 2024-08-02 11:24:45 +09:00
parent b798f04dfc
commit b05f555d9a
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ public class WebConfiguration implements WebMvcConfigurer {
public void addCorsMappings(CorsRegistry registry) { public void addCorsMappings(CorsRegistry registry) {
registry registry
.addMapping("/**") .addMapping("/**")
.allowedOriginPatterns("https://i11a701.p.ssafy.io/", "http://localhost:5173", "http://localhost:4173","http://localhost:5080","http://192.168.*.*:5173") .allowedOriginPatterns("https://i11a701.p.ssafy.io/","https://localhost:5173", "http://localhost:5173", "http://localhost:4173","http://localhost:5080","http://192.168.*.*:5173")
.allowedMethods("GET","POST",HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(), .allowedMethods("GET","POST",HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(),
HttpMethod.DELETE.name(), HttpMethod.HEAD.name(), HttpMethod.OPTIONS.name(), HttpMethod.DELETE.name(), HttpMethod.HEAD.name(), HttpMethod.OPTIONS.name(),
HttpMethod.PATCH.name()) HttpMethod.PATCH.name())

View File

@ -26,7 +26,7 @@ import java.util.Map;
@RequestMapping("/user") @RequestMapping("/user")
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@CrossOrigin(origins = "http://localhost:5173", allowedHeaders = "*", allowCredentials = "true")
public class UserController { public class UserController {
private final UserService userService; private final UserService userService;