Add HandleCors middleware
This commit is contained in:
@@ -15,6 +15,7 @@ class Kernel extends HttpKernel
|
||||
*/
|
||||
protected $middleware = [
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\App\Http\Middleware\HandleCors::class,
|
||||
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
|
||||
16
app/Http/Middleware/HandleCors.php
Normal file
16
app/Http/Middleware/HandleCors.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Fruitcake\Cors\HandleCors as Middleware;
|
||||
|
||||
class HandleCors extends Middleware
|
||||
{
|
||||
/**
|
||||
* The paths to enable CORS on.
|
||||
* Example: ['api/*']
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $paths = [];
|
||||
}
|
||||
Reference in New Issue
Block a user