mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 07:12:19 +00:00
fix: always set secure on cookie (#130)
This commit is contained in:
@@ -166,7 +166,7 @@ func (uc *UserController) exchangeOneTimeAccessTokenHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("access_token", token, int(time.Hour.Seconds()), "/", "", false, true)
|
||||
c.SetCookie("access_token", token, int(time.Hour.Seconds()), "/", "", true, true)
|
||||
c.JSON(http.StatusOK, userDto)
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ func (uc *UserController) getSetupAccessTokenHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("access_token", token, int(time.Hour.Seconds()), "/", "", false, true)
|
||||
c.SetCookie("access_token", token, int(time.Hour.Seconds()), "/", "", true, true)
|
||||
c.JSON(http.StatusOK, userDto)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user