Skip to content

Commit

Permalink
refactor: cors 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
capDoYeonLee committed Dec 5, 2024
1 parent 8fb6e95 commit 4d6d145
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import java.util.List;
import java.util.stream.Collectors;

import static sun.security.pkcs11.wrapper.Functions.addMapping;

@Configuration
@EnableWebMvc
@Slf4j
Expand All @@ -31,7 +33,8 @@ public void addCorsMappings(CorsRegistry registry) {
String[] patterns = allowOriginUrlPatterns.toArray(String[]::new);

registry
.addMapping("/api/**")
//.addMapping("/api/**")
.addMapping("/**")
.allowedOriginPatterns(patterns)
.allowedHeaders("*")
.allowedMethods(ALLOWED_METHOD_NAMES.split(","))
Expand Down
2 changes: 1 addition & 1 deletion BE/error/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spring.datasource.username=root
spring.datasource.password=
spring.profiles.include=token,ouath
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQLDialect
cors.allow-origin.urls=https://econo-calendar.com, http://localhost:5173, https://error.econo-calendar.com
cors.allow-origin.urls=https://econo-calendar.com,http://localhost:5173,https://error.econo-calendar.com:8080
spring.data.redis.host=redis
spring.data.redis.port=6379

Expand Down

0 comments on commit 4d6d145

Please sign in to comment.