Skip to content

Commit

Permalink
Merge pull request #91 from creative-commoners/pulls/3.0/cms5-readme
Browse files Browse the repository at this point in the history
DOC Update README.md for CMS 5
  • Loading branch information
sabina-talipova authored Apr 23, 2023
2 parents 6bf6786 + ad602b2 commit 0d59559
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,29 @@ because the session is too large, or headers have already been set) stores it in
This allows using Silverstripe on multiple servers without sticky sessions (as long as you solve other
multi-server issues like asset storage and databases).

## Requirements
## Limitations

* MySQL database is the only supported DB store.
* MySQL database is the only supported DB store.

## Installation

* Install with composer using `composer require silverstripe/hybridsessions`
* /dev/build?flush=all to setup the necessary tables
```sh
composer require silverstripe/hybridsessions
```

## Setup

* `/dev/build?flush=all` to setup the necessary tables
* In order to initiate the session handler is is necessary to add a snippet of code to your
\_config.php, along with a private key used to encrypt user cookies.
`_config.php` file, along with a private key used to encrypt user cookies.

in `app/src/_config.php`
in `app/src/_config.php`:

```php
// Ensure that you define a sufficiently indeterminable value for SS_SESSION_KEY in your `.env`
use SilverStripe\Core\Environment;
use SilverStripe\HybridSessions\HybridSession;

HybridSession::init(SS_SESSION_KEY);
HybridSession::init(Environment::getEnv('SS_SESSION_KEY'));
```

## Security
Expand Down

0 comments on commit 0d59559

Please sign in to comment.