mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 19:51:07 +03:30
fix: cors middleware error
This commit is contained in:
@@ -6,14 +6,10 @@ 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');
|
||||
$response = $next($request);
|
||||
$response->headers->set('Access-Control-Allow-Methods', 'POST, GET, OPTIONS, PUT, DELETE');
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user