fukamachi / lack

Lack, the core of Clack
MIT License
156 stars 33 forks source link

Add samesite to bake cookie function and lack.middleware.session.state.cookie for modern browser. #51

Closed madosuki closed 3 years ago

madosuki commented 3 years ago

This PR purpose of add the SameSite in Set-Cookie to bake cookie function and lack.middleware.session.state.cookie for modern browser.

Default behavior is set "SameSite=None".

Define type of samesite-type in src/middleware/session/state/cookie.lisp. And the samesite slot in cookie-state type is that. And export that type.

usage:

(:session
  :state (make-cookie-state
     :samesite 'LACK.MIDDLEWARE.SESSION.STATE.COOKIE::LAX))