Skip to content

Commit

Permalink
Full SameSite cookie support
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjhv committed Jul 2, 2020
1 parent f7ee3c2 commit da8a3a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ $app->add(
- `lifetime`: How much should the session last? Default `20 minutes`. Any
argument that `strtotime` can parse is valid.
- `path`, `domain`, `secure`, `httponly`, `samesite`: Options for the session
cookie. Please note that `samesite` is disabled by default.
cookie. Please note that `samesite` is `'Lax'` by default, set to `''` to
disable.
- `name`: Name for the session cookie. Defaults to `slim_session` (instead of
PHP's `PHPSESSID`).
- **`autorefresh`**: `true` if you want session to be refresh when user activity
Expand Down
2 changes: 1 addition & 1 deletion src/Slim/Middleware/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct($settings = [])
'domain' => '',
'secure' => false,
'httponly' => false,
'samesite' => '',
'samesite' => 'Lax',
'name' => 'slim_session',
'autorefresh' => false,
'handler' => null,
Expand Down

0 comments on commit da8a3a7

Please sign in to comment.