From 55ee29f30163fda642ee7b70a1ba22963ba6b613 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 26 Sep 2019 21:03:08 -0600 Subject: [PATCH] Update APIV1Controller, fix cors bug --- app/Http/Controllers/Api/ApiV1Controller.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index e4020228c..f41fc2c19 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -86,7 +86,9 @@ class ApiV1Controller extends Controller 'client_secret' => $client->secret, 'vapid_key' => null ]; - return $res; + return response()->json($res, 200, [ + 'Access-Control-Allow-Origin' => '*' + ]); } /** @@ -241,7 +243,7 @@ class ApiV1Controller extends Controller $res = []; } } - + return response()->json($res); }