Skip to content

Commit

Permalink
Merge pull request #26 from pick-time/feature/cors
Browse files Browse the repository at this point in the history
fix: CORS 설정 변경 및 프론트 로컬 개발환경에서 proxy를 사용하지 않고 개발할 수 있도록 변경
  • Loading branch information
comody authored Jul 26, 2023
2 parents 7c56252 + 2e18490 commit 0ab2277
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/teo15/picktimebe/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("https://pick-time.vercel.app")
.allowedOriginPatterns("*")
.allowedMethods("*")
.allowedHeaders("*")
.allowCredentials(true)
.maxAge(3000);
}
}

0 comments on commit 0ab2277

Please sign in to comment.