Skip to content

Commit

Permalink
Add optional cookieValidationKey
Browse files Browse the repository at this point in the history
  • Loading branch information
forevermatt committed Jun 13, 2018
1 parent 8160aa9 commit f8549ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/frontend/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/* Get frontend-specific config settings from ENV vars or set defaults. */
$frontCookieSecure = Env::get('FRONT_COOKIE_SECURE', true);
$cookieValidationKey = Env::get('COOKIE_VALIDATION_KEY');

$sessionLifetime = 1800; // 30 minutes

Expand Down Expand Up @@ -36,6 +37,8 @@
'errorAction' => 'site/error',
],
'request' => [
'cookieValidationKey' => $cookieValidationKey,
'enableCookieValidation' => !empty($cookieValidationKey),
'enableCsrfValidation' => false,
'parsers' => [
'application/json' => 'yii\web\JsonParser',
Expand Down
1 change: 1 addition & 0 deletions local.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=
COMPOSER_AUTH={"github-oauth":{"github.com":"tokenhere"}}
COMPOSER_CACHE_DIR=/tmp
COOKIE_VALIDATION_KEY=
UI_URL=http://idp-pw.local/#
UI_CORS_ORIGIN=http://idp-pw.local
HELP_CENTER_URL=https://google.com/
Expand Down

0 comments on commit f8549ca

Please sign in to comment.