Skip to content

Commit

Permalink
Merge branch '1.4' of https://github.com/getgrav/grav into 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 27, 2017
2 parents f48c0b1 + b35b9ea commit 8f522ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
1. [](#bugfix)
* Fix for base paths containing special characters [#1799](https://github.com/getgrav/grav/issues/1799)
* Fix for `vundefined` error for version numbers in GPM [form#222](https://github.com/getgrav/grav-plugin-form/issues/222)
1. [](#improved)
* Added new configuration option `system.session.initialize` to delay session initialization if needed by a plugin

# v1.4.0-beta.2
## 12/18/2017
Expand Down
1 change: 1 addition & 0 deletions system/config/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ media:

session:
enabled: true # Enable Session support
initialize: true # Initialize session from Grav (if false, plugin needs to start the session)
timeout: 1800 # Timeout in seconds
name: grav-site # Name prefix of the session cookie. Use alphanumeric, dashes or underscores only. Do not use dots in the session name
secure: false # Set session secure. If true, indicates that communication for this cookie must be over an encrypted transmission. Enable this only on sites that run exclusively on HTTPS
Expand Down
8 changes: 6 additions & 2 deletions system/src/Grav/Common/Processors/InitializeProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ public function process()
date_default_timezone_set($this->container['config']->get('system.timezone'));
}

// Initialize uri, session.
$this->container['session']->init();
// FIXME: Initialize session should happen later after plugins have been loaded. This is a workaround to fix session issues in AWS.
if ($this->container['config']->get('system.session.initialize', 1)) {
$this->container['session']->init();
}

// Initialize uri.
$this->container['uri']->init();

$this->container->setLocale();
Expand Down

0 comments on commit 8f522ee

Please sign in to comment.