diff --git a/core/core.services.yml b/core/core.services.yml index ebfd460..7eb4956 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -398,7 +398,7 @@ services: class: Drupal\Core\StackMiddleware\Cors arguments: [{ allowedHeaders: ["*"], allowedMethods: ['DELETE', 'GET', 'POST', 'PUT'], allowedOrigins: ["*"] }] tags: - - [name: http_middleware, priority: 400 ] + - { name: http_middleware, priority: 400 } language_manager: class: Drupal\Core\Language\LanguageManager arguments: ['@language.default'] diff --git a/core/lib/Drupal/Core/StackMiddleware/Cors.php b/core/lib/Drupal/Core/StackMiddleware/Cors.php new file mode 100644 index 0000000..b632b1a --- /dev/null +++ b/core/lib/Drupal/Core/StackMiddleware/Cors.php @@ -0,0 +1,39 @@ +app = $app; + $this->cors = new BaseCors($app, $options); + } + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { + return $this->cors->handle($request, $type, $catch); + } + +}