mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
23 lines
447 B
PHP
23 lines
447 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Middleware;
|
||
|
|
||
|
use Closure;
|
||
|
|
||
|
class Cors
|
||
|
{
|
||
|
/**
|
||
|
* Handle an incoming request.
|
||
|
*
|
||
|
* @param \Illuminate\Http\Request $request
|
||
|
* @param \Closure $next
|
||
|
* @return mixed
|
||
|
*/
|
||
|
public function handle($request, Closure $next)
|
||
|
{
|
||
|
return $next($request)
|
||
|
->header('Access-Control-Allow-Origin', '*')
|
||
|
->header('Access-Control-Allow-Methods', 'GET, POST');
|
||
|
}
|
||
|
}
|