Skip to content

Commit

Permalink
Merge pull request #31 from CSID-DGU/develop
Browse files Browse the repository at this point in the history
[Chore] vercel ๋ฐฐํฌ ์ฃผ์†Œ ์ถ”๊ฐ€
  • Loading branch information
saokiritoni authored Nov 27, 2024
2 parents 7e472f6 + 4e36184 commit a47dfd4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/dongguk/osori/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ public PasswordEncoder passwordEncoder() {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(List.of("http://localhost:3000")); // ์ •ํ™•ํ•œ ์˜ค๋ฆฌ์ง„ ์„ค์ •
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); // ํ—ˆ์šฉํ•  HTTP ๋ฉ”์„œ๋“œ
configuration.setAllowedHeaders(List.of("Authorization", "Cache-Control", "Content-Type")); // ํ—ˆ์šฉํ•  HTTP ํ—ค๋”
configuration.setAllowCredentials(true); // ์ž๊ฒฉ ์ฆ๋ช… ํ—ˆ์šฉ
configuration.setAllowedOrigins(List.of("http://localhost:3000", "https://2024-2-oss-proj-osori-fe.vercel.app"));
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"));
configuration.setAllowedHeaders(List.of("Authorization", "Cache-Control", "Content-Type"));
configuration.setAllowCredentials(true);

UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration); // ๋ชจ๋“  ๊ฒฝ๋กœ์— ๋Œ€ํ•ด ์„ค์ • ์ ์šฉ
source.registerCorsConfiguration("/**", configuration);
return source;
}
}

0 comments on commit a47dfd4

Please sign in to comment.