Laravel middleware to start a cookieless session
kevinsimard/laravel-cookieless-session is a Laravel package for laravel middleware to start a cookieless session.
It currently has 14 GitHub stars and 17.034 downloads on Packagist (latest version v1.2.4).
Install it with composer require kevinsimard/laravel-cookieless-session.
Discover more Laravel packages by kevinsimard
or browse all Laravel packages to compare alternatives.
Last updated
All you need to do is to add the following key X-Session-Token to your requests" headers to load sessions.
Replace the original start session middleware in app/Http/Kernel.php.
<?php namespace App\Http;
use Illuminate\Foundation\Http;
class Kernel extends Http\Kernel
{
/**
* @var array
*/
protected $middleware = [
//"Illuminate\Session\Middleware\StartSession",
"Kevinsimard\CookielessSession\Middleware\StartSession",
...
];
...
Replace the original session service provider in config/app.php.
"providers" => [
...
//"Illuminate\Session\SessionServiceProvider",
"Kevinsimard\CookielessSession\Providers\SessionServiceProvider",
...
],
├── src
│ └── Kevinsimard
│ └── CookielessSession
│ ├── Middleware
│ │ └── StartSession.php
│ └── Providers
│ └── SessionServiceProvider.php
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── composer.json
This package is open-sourced software licensed under the MIT license.