public function boot(
        ConfiguratorInterface $config,
        HttpBootloader $http,
        DirectoriesInterface $directories
    ) {
        $config->setDefaults('session', [
            'lifetime' => 86400,
            'cookie'   => 'sid',
            'secure'   => false,
            'handler'  => new Autowire(FileHandler::class, [
                    'directory' => $directories->get('runtime') . 'session',
                    'lifetime'  => 86400
                ]
            )
        ]);

        $session = $config->getConfig('session');

        $http->whitelistCookie($session['cookie']);
        $http->addMiddleware(SessionMiddleware::class);
    }
public function boot(
        ConfiguratorInterface $config,
        HttpBootloader $http,
        DirectoriesInterface $directories
    ) {
        $config->setDefaults('session', [
            'lifetime' => 86400,
            'cookie'   => 'sid',
            'secure'   => false,
            'handler'  => new Autowire(FileHandler::class, [
                    'directory' => $directories->get('runtime') . 'session',
                    'lifetime'  => 86400
                ]
            )
        ]);

        $session = $config->getConfig('session');

        $http->whitelistCookie($session['cookie']);
        $http->addMiddleware(SessionMiddleware::class);
    }
public function boot ( ConfiguratorInterface $ config , HttpBootloader $ http , DirectoriesInterface $ directories ) { $ config -> setDefaults ( 'session' , [ 'lifetime' => 86400 , 'cookie' => 'sid' , 'secure' => false , 'handler' => new Autowire ( FileHandler :: class , [ 'directory' => $ directories -> get ( 'runtime' ) . 'session' , 'lifetime' => 86400 ] ) ] ) ; $ session = $ config -> getConfig ( 'session' ) ; $ http -> whitelistCookie ( $ session [ 'cookie' ] ) ; $ http -> addMiddleware ( SessionMiddleware :: class ) ; }
Automatically registers session starter middleware and excludes session cookie from
cookie protection.

@param ConfiguratorInterface $config
@param HttpBootloader        $http
@param DirectoriesInterface  $directories
Automatically registers session starter middleware and excludes session cookie from cookie protection .