Skip to content

Commit

Permalink
[fix] : Config 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chahyunsoo committed May 9, 2024
1 parent 60be581 commit f82a925
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/main/java/capstone/recipable/domain/HealthCheckApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ public class HealthCheckApi {
public String hello() {
return "Hello, Recipable!";
}

@GetMapping("/")
public String test() {
return "Hello!";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.csrf(c -> c.disable())
.authorizeHttpRequests(c -> c
.requestMatchers(
"/",
"/api/sign-up",
"/api/login",
"/users/main",
Expand All @@ -34,7 +35,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.addFilterBefore(jwtFilter, ExceptionTranslationFilter.class)
.cors(c -> c.configurationSource(request -> {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOrigins(List.of("http://localhost:3000", "https://recipable.store"));
config.setAllowedOrigins(List.of("http://localhost:5173", "https://recipable.store"));
config.setAllowedMethods(List.of("*"));
config.setAllowCredentials(true);
config.setAllowedHeaders(List.of("*"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public void addCorsMappings(CorsRegistry corsRegistry) {

corsRegistry.addMapping("/**")
.exposedHeaders("Set-Cookie")
.allowedOrigins("https://recipable.store")
.allowedOrigins("http://localhost:5173");
.allowedOrigins("http://localhost:5173")
.allowedOrigins("https://recipable.store");
}
}

0 comments on commit f82a925

Please sign in to comment.