Skip to content

Commit

Permalink
Merge pull request #74 from Hanaro-trip-together-bank/setting
Browse files Browse the repository at this point in the history
setting: webconfig설정
  • Loading branch information
mummhy0811 authored May 30, 2024
2 parents 4f529ef + 704e87d commit 096a2e2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/java/com/hanaro/triptogether/WebConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.hanaro.triptogether;

import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@RequiredArgsConstructor
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry
.addMapping("/**")
.allowedHeaders("*")
.allowedMethods("*")
.allowedOrigins("http://localhost:5173")
.allowCredentials(true);
}
}

0 comments on commit 096a2e2

Please sign in to comment.