From 6ae6e9f958831a11b108ce154ddecdcaf1900fd8 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Fri, 24 Jun 2022 17:30:28 +0300 Subject: [PATCH] add cors plugin --- composer.json | 3 ++- config/app.php | 1 + config/streams.php | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e248962f9..4233c0ef2 100644 --- a/composer.json +++ b/composer.json @@ -94,7 +94,8 @@ "visiosoft/base-theme": "^1.0", "visiosoft/advs-module": "^1.0", "visiosoft/json-field_type": "^1.0", - "visiosoft/language_switcher-plugin": "^1.0" + "visiosoft/language_switcher-plugin": "^1.0", + "fruitcake/laravel-cors": "^2.0" }, "replace": { "anomaly/streams-platform": "*" diff --git a/config/app.php b/config/app.php index 2cd53f0ca..027fc29a0 100644 --- a/config/app.php +++ b/config/app.php @@ -209,6 +209,7 @@ return [ */ Anomaly\Streams\Platform\StreamsServiceProvider::class, Sentry\Laravel\ServiceProvider::class, + \Fruitcake\Cors\CorsServiceProvider::class ], /* diff --git a/config/streams.php b/config/streams.php index 7add737bb..56fdcff0e 100644 --- a/config/streams.php +++ b/config/streams.php @@ -90,7 +90,9 @@ return [ | */ - 'middleware' => [], + 'middleware' => [ + \Fruitcake\Cors\HandleCors::class, # this line + ], /* |--------------------------------------------------------------------------