fix(go): set logout cache-control header+add check
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4e17a6c911
commit
fa1253a675
@ -21,7 +21,9 @@ func Logout() echo.HandlerFunc {
|
||||
log.Infof("max-age before logout: %d", sess.Options.MaxAge)
|
||||
sess.Options.MaxAge = -1
|
||||
|
||||
if username := sess.Values["username"]; username != nil {
|
||||
c.Response().Writer.Header().Set("Cache-Control", "no-store")
|
||||
|
||||
if username := sess.Values["username"]; username != nil && username.(string) != "" {
|
||||
sess.Values["username"] = ""
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user