mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
20 lines
404 B
PHP
20 lines
404 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Middleware;
|
||
|
|
||
|
use Closure;
|
||
|
|
||
|
class Cors
|
||
|
{
|
||
|
|
||
|
public function handle($request, Closure $next)
|
||
|
{
|
||
|
|
||
|
return $next($request)
|
||
|
->header('Access-Control-Allow-Origin', '*')
|
||
|
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
|
||
|
->header('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, X-Token-Auth, Authorization');
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|