Middleware se encarga de validar que usuario pertenezca al restaurant
This commit is contained in:
@@ -14,15 +14,13 @@ class CorsMiddleware {
|
||||
'Access-Control-Allow-Headers' => 'Content-Type, Authorization, X-Requested-With'
|
||||
];
|
||||
|
||||
if ($request->isMethod('OPTIONS'))
|
||||
{
|
||||
if ($request->isMethod('OPTIONS')) {
|
||||
return response()->json([], 200, $headers);
|
||||
}
|
||||
|
||||
$response = $next($request);
|
||||
|
||||
foreach($headers as $key => $value)
|
||||
{
|
||||
foreach($headers as $key => $value) {
|
||||
$response->header($key, $value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user