first commit

This commit is contained in:
franknstayn
2021-07-03 18:39:08 +08:00
commit 5483c9517d
1555 changed files with 417773 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?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)
{
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header("Access-Control-Allow-Headers: *");
// header('Access-Control-Allow-Credentials: true');
if (!$request->isMethod('options')) {
return $next($request);
}
}
}