From b5c81aa956f07b15e5f541a9b0821239d2932dc4 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 23 Nov 2016 22:10:29 +0100 Subject: [PATCH] Use httpOnly Cookie --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index ead8441..b38441e 100644 --- a/main.go +++ b/main.go @@ -79,7 +79,7 @@ func loginPost(c *gin.Context) { c.AbortWithStatus(http.StatusUnauthorized) } - c.SetCookie("authentication", t, (int)((expiration * time.Hour).Seconds()), "/", "localhost:8080", true, false) + c.SetCookie("authentication", t, (int)((expiration * time.Hour).Seconds()), "/", "localhost:8080", true, true) c.JSON(http.StatusOK, map[string]string{ "token": t,