We are using Laravel and trying to update the Cors.php middleware, but it's not working.
Here is the Cors.php code
public function handle($request, Closure $next)
{
if (null !== $request->server->get('HTTP_POSTMAN_TOKEN')) {
abort(404);
}
return $next($request)
->header('Access-Control-Allow-Origin', '/')
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
->header('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, X-Token-Auth, Authorization');
}