Skip to content

Commit

Permalink
Update documentation to reflect new API
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Aug 22, 2019
1 parent fe9ebb7 commit bc2154a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ Ensure you always either call `close()` or `transmit()` to have the session data
Secure
------

As of 0.6.0, the [Secure flag](https://www.owasp.org/index.php/SecureFlag) is set for all session cookies. If you develop on localhost using *http* only, you will need to tell the sessions instance as follows:
The [Secure flag](https://www.owasp.org/index.php/SecureFlag) is set for all session cookies. If you develop on localhost using *http* only, you will need to tell the sessions instance as follows:

```php
// This will omit the "Secure" flag from session cookies
$sessions= (new InFileSystem('/tmp'))->insecure('dev' === $this->environment->profile());
// This will omit the "Secure" flag from session cookies in dev environment
$dev= 'dev' === $this->environment->profile();
$sessions= (new InFileSystem('/tmp'))->via((new Cookies())->insecure($dev));
```

0 comments on commit bc2154a

Please sign in to comment.