41 lines
970 B
PHP
41 lines
970 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
|
use \Illuminate\Http\Request;
|
|
|
|
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 = [
|
|
// 'public/cmms-download',
|
|
// 'cmms/create',
|
|
// 'webapi/contracts/setad',
|
|
// 'webapi/contracts/eblagh',
|
|
// 'webapi/profile/edit',
|
|
// 'webapi/camp/*',
|
|
// 'webapi/*',
|
|
// 'users/change_confirmed_status'
|
|
];
|
|
|
|
protected function inExceptArray($request)
|
|
{
|
|
if (config('global_variables.IS_DEVELOPMENT_ENV')) {
|
|
return true;
|
|
} else {
|
|
return parent::inExceptArray($request);
|
|
}
|
|
}
|
|
} |