|
|
@@ -15,13 +15,13 @@ class CORS
|
|
|
*/
|
|
|
public function handle($request, Closure $next)
|
|
|
{
|
|
|
- header('Access-Control-Allow-Origin: *');
|
|
|
+// header('Access-Control-Allow-Origin: *');
|
|
|
|
|
|
$headers = [
|
|
|
+ 'Access-Control-Allow-Origin'=> '*',
|
|
|
'Access-Control-Allow-Methods'=> 'POST, GET, OPTIONS, PUT, DELETE',
|
|
|
'Access-Control-Allow-Headers'=> 'Content-Type, X-Auth-Token, Origin',
|
|
|
-// 'Access-Control-Allow-Origin'=> '*',
|
|
|
- 'Access-Control-Allow-Credentials'=> 'false'
|
|
|
+ 'Access-Control-Allow-Credentials'=> 'false',
|
|
|
];
|
|
|
if($request->getMethod() == "OPTIONS") {
|
|
|
return Response::make('OK', 200, $headers);
|