Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix/#-] CORS 에러 수정을 위해 allowed origin 추가 #71

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/org/dnd/timeet/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ public CorsConfigurationSource configurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.addAllowedHeader("*");
configuration.addAllowedMethod("*");
configuration.addAllowedOriginPattern("*");
configuration.addAllowedOrigin(frontlocalurl);
configuration.addAllowedOrigin("https://timeet.vercel.app");
// configuration.addAllowedOriginPattern("*");
configuration.setAllowCredentials(true); // 클라이언트에서 쿠키 요청 허용
configuration.addExposedHeader("Authorization"); // 권고사항

Expand All @@ -188,7 +190,7 @@ public CorsConfigurationSource configurationSource() {
// return source;
// }
//
// // 운영 환경용 CORS 설정
// 운영 환경용 CORS 설정
// @Bean
// @Profile("prod")
// public CorsConfigurationSource prodCorsConfigurationSource() {
Expand Down
Loading