Skip to content

Commit 2485523

Browse files
authored
Merge pull request #76 from FortuneMon/feat/#75-프론트앤드-배포-url-cors-해결
pr 프론트 앤드 배포 url 등록 (webconfig, securityconfig)
2 parents 6e4e0fc + 43afcec commit 2485523

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/FortuneMonBackEnd/fortuneMon/config/WebConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public WebMvcConfigurer corsConfigurer() {
1313
@Override
1414
public void addCorsMappings(CorsRegistry registry) {
1515
registry.addMapping("/**")
16-
.allowedOrigins("http://localhost:5173", "http://localhost:3000") // 프론트엔드 주소 추가
16+
.allowedOrigins("http://localhost:5173", "http://localhost:3000", "https://fortunemon.vercel.app") // 프론트엔드 주소 추가
1717
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")
1818
.allowedHeaders("*")
1919
.allowCredentials(true);

src/main/java/FortuneMonBackEnd/fortuneMon/config/security/SecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public PasswordEncoder passwordEncoder() {
5757
@Bean
5858
public CorsConfigurationSource corsConfigurationSource() {
5959
CorsConfiguration config = new CorsConfiguration();
60-
config.setAllowedOrigins(List.of("http://localhost:5173", "http://localhost:3000")); // 프론트엔드 주소
60+
config.setAllowedOrigins(List.of("http://localhost:5173", "http://localhost:3000", "https://fortunemon.vercel.app")); // 프론트엔드 주소
6161
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE","PATCH","OPTIONS"));
6262
config.setAllowedHeaders(List.of("*"));
6363
config.setAllowCredentials(true); // 인증 정보 포함 요청 허용 (ex. 쿠키)

0 commit comments

Comments
 (0)