2021-06-05 09:26:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
|
2023-01-21 00:04:23 +00:00
|
|
|
use App\Helpers\ExtensionHelper;
|
2021-06-05 09:26:32 +00:00
|
|
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
2023-01-21 00:04:23 +00:00
|
|
|
use Illuminate\Contracts\Encryption\Encrypter;
|
|
|
|
use Illuminate\Contracts\Foundation\Application;
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
|
|
class VerifyCsrfToken extends Middleware
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The URIs that should be excluded from CSRF verification.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2023-01-21 00:04:23 +00:00
|
|
|
protected $except = [];
|
|
|
|
|
|
|
|
public function __construct(Application $app, Encrypter $encrypter)
|
|
|
|
{
|
|
|
|
$this->app = $app;
|
|
|
|
$this->encrypter = $encrypter;
|
|
|
|
$this->except = ExtensionHelper::getAllCsrfIgnoredRoutes();
|
|
|
|
}
|
2021-06-05 09:26:32 +00:00
|
|
|
}
|