1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00
invoiceninja/app/Http/Middleware/VerifyCsrfToken.php

46 lines
1.1 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
2019-05-11 05:32:07 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
2019-05-11 05:32:07 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2022-04-27 05:20:41 +02:00
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2019-05-11 05:32:07 +02:00
*/
2018-10-04 19:10:43 +02:00
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
2022-01-15 05:07:40 +01:00
use Illuminate\Session\TokenMismatchException;
2018-10-04 19:10:43 +02:00
class VerifyCsrfToken extends Middleware
{
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
* @var bool
*/
protected $addHttpCookie = true;
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
2021-06-02 10:55:33 +02:00
// 'livewire/message/*'
2018-10-04 19:10:43 +02:00
];
2022-01-15 05:07:40 +01:00
2022-01-15 10:49:40 +01:00
// public function handle($request, \Closure $next) {
2022-01-15 05:07:40 +01:00
2022-01-15 10:49:40 +01:00
// try {
// return parent::handle($request, $next);
// } catch (TokenMismatchException $ex) {
2022-01-15 05:07:40 +01:00
2022-01-15 10:49:40 +01:00
// throw new TokenMismatchException('CSRF token mismatch.');
2022-01-15 05:07:40 +01:00
2022-01-15 10:49:40 +01:00
// }
// }
2018-10-04 19:10:43 +02:00
}