Update APIV1Controller, fix cors bug

This commit is contained in:
Daniel Supernault 2019-09-26 21:03:08 -06:00
parent 11cd75e8e8
commit 55ee29f301
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -86,7 +86,9 @@ class ApiV1Controller extends Controller
'client_secret' => $client->secret, 'client_secret' => $client->secret,
'vapid_key' => null 'vapid_key' => null
]; ];
return $res; return response()->json($res, 200, [
'Access-Control-Allow-Origin' => '*'
]);
} }
/** /**
@ -241,7 +243,7 @@ class ApiV1Controller extends Controller
$res = []; $res = [];
} }
} }
return response()->json($res); return response()->json($res);
} }