WP File Manager
Current Path:
/
home
/
itutorethiopia
/
public_html
/
app
/
Http
/
Middleware
/
Name
Action
..
Authenticate.php
Edit
EncryptCookies.php
Edit
RTL.php
Edit
RedirectIfAuthenticated.php
Edit
ShortcodeMiddleware.php
Edit
TrimStrings.php
Edit
TrustProxies.php
Edit
VerifyCsrfToken.php
Edit
XSS.php
Edit
bsetecAuth.php
Edit
Editing: VerifyCsrfToken.php
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; class VerifyCsrfToken extends Middleware { protected $except_urls = [ 'api-ios/*', 'api-droid/*', 'api-additional-mod/*' ]; /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ // public function handle($request, Closure $next) // { // return parent::handle($request, $next); // } public function handle($request, Closure $next) { $regex = '#' . implode('|', $this->except_urls) . '#'; if ($this->isReading($request) || $this->tokensMatch($request) || preg_match($regex, $request->path())) { return $this->addCookieToResponse($request, $next($request)); } throw new TokenMismatchException; } }