Skip to content

Commit 9695908

Browse files
authored
Merge pull request #147 from prgrms-web-devcourse-final-project/fix/#145
[Auth] CORS 오류 수정
2 parents 8183a69 + 8eab767 commit 9695908

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/com/back/web7_9_codecrete_be/global/security/SecurityConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ public AuthenticationManager authenticationManager(AuthenticationConfiguration c
8383
public UrlBasedCorsConfigurationSource corsConfigurationSource() {
8484
CorsConfiguration configuration = new CorsConfiguration();
8585

86-
configuration.setAllowedOrigins(List.of("http://localhost:3000", "https://*.naeconcertbutakhae.shop"));
86+
configuration.setAllowedOrigins(List.of("http://localhost:3000", "https://www.naeconcertbutakhae.shop"));
8787
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
8888

8989
configuration.setAllowedHeaders(List.of("*"));
90+
configuration.setExposedHeaders(List.of("Set-Cookie"));
9091

9192
//쿠키 자동으로 넘어가게 설정
9293
configuration.setAllowCredentials(true);

src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ mailgun:
4141

4242
jwt:
4343
secret: ${SECRET_KEY}
44-
access-token-expiration: 3600 # 1시간
44+
access-token-expiration: 86400 # 1일
4545
refresh-token-expiration: 1209600 # 14일
4646

4747
tmap: #Tmap 대중교통 추천 api 키

0 commit comments

Comments
 (0)