Skip to content

Commit

Permalink
install Barryvdh laravel cors and setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bakai-dev committed Feb 10, 2019
1 parent 6f59515 commit b3a5372
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Kernel extends HttpKernel
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\SetLocale::class,
\Barryvdh\Cors\HandleCors::class,
];


Expand Down
1 change: 1 addition & 0 deletions backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^7.1.3",
"barryvdh/laravel-cors": "^0.11.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/socialite": "^4.0",
Expand Down
116 changes: 115 additions & 1 deletion backend/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions backend/config/cors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Laravel CORS
|--------------------------------------------------------------------------
|
| allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
| to accept any value.
|
*/

'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedOriginsPatterns' => [],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 0,

];

0 comments on commit b3a5372

Please sign in to comment.