diff --git a/src/CorsServiceProvider.php b/src/CorsServiceProvider.php index 1319ac3..8b39c97 100644 --- a/src/CorsServiceProvider.php +++ b/src/CorsServiceProvider.php @@ -35,13 +35,6 @@ public function boot() } elseif ($this->app instanceof LumenApplication) { $this->app->configure('cors'); } - - // Add the headers on the Request Handled event as fallback in case of exceptions - if (class_exists(RequestHandled::class) && $this->app->bound('events')) { - $this->app->make('events')->listen(RequestHandled::class, function (RequestHandled $event) { - $this->app->make(HandleCors::class)->onRequestHandled($event); - }); - } } /**