Skip to content

Commit

Permalink
🚀 프론트 https 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
RetepMil committed Oct 3, 2023
1 parent d3db0b7 commit bbaf114
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- "develop"
- "main"
- "hotfix/cd-script"
- "infra/https-config"
pull_request:
branches:
- "develop"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WebConfig : WebMvcConfigurer {
// CORS 설정
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:5173", "http://dailysteady.site/")
.allowedOrigins("http://localhost:5173", "https://dailysteady.site/")
.allowedMethods("*")
.allowCredentials(true)
.exposedHeaders("*")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ class JwtTokenProvider(
.value(refreshTokenValue)
.path("/")
.maxAge(maxAgeSeconds)
.httpOnly(false) // 배포 환경에서는 true로 설정 필요
.httpOnly(true)
.secure(true)
.sameSite("None")
.build()

fun generateAccessTokenCookie(accessTokenValue: String): ResponseCookie = ResponseCookie.from("x-access-token")
.value(accessTokenValue)
.maxAge(expirationMiliseconds)
.httpOnly(false)
.httpOnly(true)
.secure(true)
.sameSite("None")
.build()
Expand Down

0 comments on commit bbaf114

Please sign in to comment.