auth: add note for self about secure cookies

pull/297/head
Harvey Tindall 3 months ago
parent fcdd4e4518
commit 711b817cff
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -251,6 +251,7 @@ func (app *appContext) getTokenLogin(gc *gin.Context) {
// host := gc.Request.URL.Hostname() // host := gc.Request.URL.Hostname()
host := app.ExternalDomain host := app.ExternalDomain
// Before you think this is broken: the first "true" arg is for "secure", i.e. only HTTPS!
gc.SetCookie("refresh", refresh, REFRESH_TOKEN_VALIDITY_SEC, "/", host, true, true) gc.SetCookie("refresh", refresh, REFRESH_TOKEN_VALIDITY_SEC, "/", host, true, true)
gc.JSON(200, getTokenDTO{token}) gc.JSON(200, getTokenDTO{token})
} }

Loading…
Cancel
Save