[server] Set same site cookie

This commit is contained in:
Abhishek Shroff
2025-04-28 23:08:39 +05:30
parent 76f8074a1d
commit 4968c49318

View File

@@ -61,5 +61,6 @@ func handleSetCookie(c *gin.Context) {
panic(errors.NewError(http.StatusBadRequest, "missing_token", "Auth Token Not Specified"))
}
secure := c.Request.URL.Scheme == "https"
c.SetSameSite(http.SameSiteStrictMode)
c.SetCookie("auth_token", token, 3600, "", c.Request.URL.Hostname(), secure, true)
}