Skip to content

Commit

Permalink
Fix: 헤더에 cache 설정 안 나오도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
diddnwjd committed Mar 7, 2024
1 parent 9254d75 commit 16bd009
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/ixxp/culpop/config/WebSecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD")
.allowedOrigins("http://localhost:8080", "http://localhost:5173/", "http://43.202.13.38:8081/", "https://www.culpop.shop/", "https://my.culpop.shop/", "https://a.culpop.vercel.app/")
.allowCredentials(true)
.exposedHeaders("AccessToken");
.allowCredentials(true);
}
}
3 changes: 3 additions & 0 deletions src/main/java/com/ixxp/culpop/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public void login(UserLoginRequest userLoginRequest, HttpServletResponse respons
// Cookie 로 accessToken 반환
Cookie accessTokenCookie = jwtUtil.createAccessTokenCookie(email, user.getRole());
response.addCookie(accessTokenCookie);
response.setHeader("Cache-Control", "public, max-age=86400");
response.setHeader("Expires", "");
response.setHeader("Pragma", "");
}

// 프로필 수정
Expand Down

0 comments on commit 16bd009

Please sign in to comment.