Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/bounswe/bounswe2023group6
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
erkamkavak committed Dec 26, 2023
2 parents fbd79d7 + 32a747d commit aec78fc
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class AccessController(
fun login(@RequestBody request: LoginRequest, response: HttpServletResponse){
val sessionId = accessService.login(request.username, request.password)

// val cookie = Cookie("SESSIONID", "$sessionId")
// cookie.path = "/"
// response.addCookie(cookie)
val cookie = Cookie("SESSIONID", "$sessionId")
cookie.path = "/"
response.addCookie(cookie)

// Manually construct the Set-Cookie header value
val cookieValue = "SESSIONID=$sessionId; Path=/; SameSite=None; Secure"
// val cookieValue = "SESSIONID=$sessionId; Path=/; SameSite=None; Secure"

// Add the Set-Cookie header to the response
response.addHeader("Set-Cookie", cookieValue)
// response.addHeader("Set-Cookie", cookieValue)

response.setHeader("Access-Control-Allow-Credentials", "true")
}
Expand Down

0 comments on commit aec78fc

Please sign in to comment.