Skip to content

Commit

Permalink
Merge pull request #142 from MUIT-UMC/develop
Browse files Browse the repository at this point in the history
[merge] 250219 / 36th deploy
  • Loading branch information
chaechaen authored Feb 19, 2025
2 parents b50037c + 253bd2d commit ee09675
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/muit/backend/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:5173", "http://localhost:8080", "http://13.209.69.125:8080")
.allowedOrigins("http://localhost:5173", "http://localhost:8080", "http://13.209.69.125:8080", "https://muitproject.vercel.app")
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD", "PATCH")
.allowedHeaders("*")
.allowCredentials(true)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/muit/backend/config/jwt/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
public class SecurityConfig {
private final TokenProvider tokenProvider;
private final JwtFilter jwtFilter;

@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
Expand All @@ -28,6 +29,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
config.addAllowedOrigin("http://localhost:8080"); // '*' 대신 명시적 출처 사용
config.addAllowedOrigin("http://localhost:5173"); // '*' 대신 명시적 출처 사용
config.addAllowedOrigin("http://13.209.69.125:8080"); //배포된 프론트엔드 서버 추가
config.addAllowedOrigin("https://muitproject.vercel.app"); //배포된 프론트엔드 주소 추가
//config.addAllowedOrigin("*");
config.addAllowedHeader("*");
config.addAllowedMethod("*");
Expand Down

0 comments on commit ee09675

Please sign in to comment.