Move session cookie name config right before session start.

As suggested by @merumelu in b1d3172f89
This commit is contained in:
Bojidar Marinov
2016-09-16 21:03:19 +03:00
parent 48da8fa295
commit a19b9537b0
2 changed files with 1 additions and 3 deletions

View File

@@ -1,5 +1,2 @@
<?php <?php
session_name('assetlib-csrf');
?> ?>

View File

@@ -60,6 +60,7 @@ $container['utils'] = function ($c) {
// csrf guard // csrf guard
$container['csrf'] = function ($c) { $container['csrf'] = function ($c) {
session_name('assetlib-csrf');
session_start(); session_start();
return new \Slim\Csrf\Guard; return new \Slim\Csrf\Guard;
}; };