fix: update docker file

This commit is contained in:
Lakhan Samani
2021-07-27 17:46:02 +05:30
parent 30f83aaf82
commit 0fd4f18dc1
5 changed files with 20 additions and 10 deletions

View File

@@ -24,6 +24,15 @@ func SetCookie(gc *gin.Context, token string) {
gc.SetCookie(constants.COOKIE_NAME, token, 3600, "/", u.Hostname(), secure, httpOnly)
}
func GetCookie(gc *gin.Context) (string, error) {
cookie, err := gc.Request.Cookie(constants.COOKIE_NAME)
if err != nil {
return "", err
}
return cookie.Value, nil
}
func DeleteCookie(gc *gin.Context) {
secure := true
httpOnly := true