gin-gonic / contrib

Collection of middlewares created by the community

Home Page:https://gin-gonic.github.io/gin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability to delete session forcibly

daikikohara opened this issue · comments

I now need to delete session by doing like this.

session.Options(sessions.Options{MaxAge: -1})
session.Clear() // or whatever changes session.written to true
session.Save()

I think it would be better if

  • DeleteSession() method is added

    or
  • Save() method takes a parameter to save session regardless of the session.written flag

I'm sorry if I'm missing something.