ErrorException {#1624 #severity: E_WARNING }
use Closure;class Cors{ public function handle($request, Closure $next) { header("Access-Control-Allow-Origin: *"); //ALLOW OPTIONS METHOD $headers = [ 'Access-Control-Allow-Methods' => 'POST,GET,OPTIONS,PUT,DELETE', 'Access-Control-Allow-Headers' => 'Content-Type, X-Auth-Token, Origin, Authorization', ]; * @return callable */ protected function forwardsTo($method) { return fn (...$arguments) => static::$app ? $this->{$method}(...$arguments) : false; } /** * Determine if the error level is a deprecation.use Closure;class Cors{ public function handle($request, Closure $next) { header("Access-Control-Allow-Origin: *"); //ALLOW OPTIONS METHOD $headers = [ 'Access-Control-Allow-Methods' => 'POST,GET,OPTIONS,PUT,DELETE', 'Access-Control-Allow-Headers' => 'Content-Type, X-Auth-Token, Origin, Authorization', ]; // since the object we're given was already a fully instantiated object. $parameters = [$passable, $stack]; } $carry = method_exists($pipe, $this->method) ? $pipe->{$this->method}(...$parameters) : $pipe(...$parameters); return $this->handleCarry($carry); } catch (Throwable $e) { return $this->handleException($passable, $e); */ public function handle($request, Closure $next) { $this->clean($request); return $next($request); } /** * Clean the request's data. * if ($callback($request)) { return $next($request); } } return parent::handle($request, $next); } /** * Transform the given value. * // since the object we're given was already a fully instantiated object. $parameters = [$passable, $stack]; } $carry = method_exists($pipe, $this->method) ? $pipe->{$this->method}(...$parameters) : $pipe(...$parameters); return $this->handleCarry($carry); } catch (Throwable $e) { return $this->handleException($passable, $e); */ public function handle($request, Closure $next) { $this->clean($request); return $next($request); } /** * Clean the request's data. * if ($callback($request)) { return $next($request); } } return parent::handle($request, $next); } /** * Transform the given value. * // since the object we're given was already a fully instantiated object. $parameters = [$passable, $stack]; } $carry = method_exists($pipe, $this->method) ? $pipe->{$this->method}(...$parameters) : $pipe(...$parameters); return $this->handleCarry($carry); } catch (Throwable $e) { return $this->handleException($passable, $e); if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) { throw new PostTooLargeException; } return $next($request); } /** * Determine the server 'post_max_size' as bytes. * // since the object we're given was already a fully instantiated object. $parameters = [$passable, $stack]; } $carry = method_exists($pipe, $this->method) ? $pipe->{$this->method}(...$parameters) : $pipe(...$parameters); return $this->handleCarry($carry); } catch (Throwable $e) { return $this->handleException($passable, $e); null, $this->getHeaders($data) ); } return $next($request); } /** * Determine if the incoming request has a maintenance mode bypass cookie. * // since the object we're given was already a fully instantiated object. $parameters = [$passable, $stack]; } $carry = method_exists($pipe, $this->method) ? $pipe->{$this->method}(...$parameters) : $pipe(...$parameters); return $this->handleCarry($carry); } catch (Throwable $e) { return $this->handleException($passable, $e); { $pipeline = array_reduce( array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination) ); return $pipeline($this->passable); } /** * Run the pipeline and return the result. * $this->bootstrap(); return (new Pipeline($this->app)) ->send($request) ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware) ->then($this->dispatchToRouter()); } /** * Bootstrap the application for HTTP requests. * $this->requestStartedAt = Carbon::now(); try { $request->enableHttpMethodParameterOverride(); $response = $this->sendRequestThroughRouter($request); } catch (Throwable $e) { $this->reportException($e); $response = $this->renderException($request, $e); }|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
|
ErrorException
|
|---|
ErrorException:
Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)
at /home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php:9
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)', '/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php', 9)
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:255)
at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)', '/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php', 9)
at header('Access-Control-Allow-Origin: *')
(/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php:9)
at App\Http\Middleware\Cors->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31)
at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40)
at Illuminate\Foundation\Http\Middleware\TrimStrings->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27)
at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:99)
at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(object(Request), object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:119)
at Illuminate\Pipeline\Pipeline->then(object(Closure))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:175)
at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144)
at Illuminate\Foundation\Http\Kernel->handle(object(Request))
(/home/rlvtecnologiacom/public_html/portal2/public/index.php:57)
|