Skip to content

Commit d44fb7d

Browse files
committed
chore : SecurityConfig 수정
1 parent e561910 commit d44fb7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/inu/codin/codin/global/config/SecurityConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public SecurityFilterChain filterChain(HttpSecurity http, CorsConfigurationSourc
4242
// 테스트 API 경로 - @PreAuthorize로 권한 제어
4343
.requestMatchers("/v3/api/test**").permitAll()
4444
// 나머지 모든 요청은 인증 필요
45-
.anyRequest().authenticated()
45+
.anyRequest().hasRole("USER")
4646
)
4747
.addFilterBefore(
4848
new TokenValidationFilter(jwtTokenValidator),
@@ -60,7 +60,7 @@ public CorsConfigurationSource corsConfigurationSource() {
6060
CorsConfiguration config = new CorsConfiguration();
6161

6262
config.setAllowCredentials(true);
63-
config.setAllowedOrigins(List.of("http://localhost:3000"));
63+
config.setAllowedOrigins(List.of("http://localhost:3000", "https://front-end-dun-mu.vercel.app"));
6464
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
6565
config.setAllowedHeaders(List.of("*"));
6666
config.setExposedHeaders(List.of("*"));

0 commit comments

Comments
 (0)