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 @@
+<?php
+
+/**
+ * @file
+ *  Contains \Drupal\Core\StackMiddleware\Cors.
+ *
+ */
+
+namespace Drupal\Core\StackMiddleware;
+
+use Symfony\Component\HttpKernel\HttpKernelInterface;
+use Symfony\Component\HttpFoundation\Request;
+use Asm89\Stack\Cors as BaseCors;
+
+class Cors implements HttpKernelInterface {
+
+  /**
+   * @var \Asm89\Stack\Cors
+   *   Cors instance.
+   */
+  private $cors;
+
+  /**
+   * @var \Symfony\Component\HttpKernel\HttpKernelInterface
+   *   HttpKernel instance.
+   */
+  private $app;
+
+  public function __construct(HttpKernelInterface $app, array $options = array()) {
+
+    $this->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);
+  }
+
+}
