ok
This commit is contained in:
30
Production/SNIPE-IT/app/Http/Middleware/NoSessionStore.php
Normal file
30
Production/SNIPE-IT/app/Http/Middleware/NoSessionStore.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class NoSessionStore
|
||||
{
|
||||
protected $except = [
|
||||
'health',
|
||||
];
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
foreach ($this->except as $except) {
|
||||
if ($request->is($except)) {
|
||||
config()->set('session.driver', 'array');
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user