mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Return status code 204 for CORS OPTIONS requests (references #681)
This commit is contained in:
parent
53a0a2f4e1
commit
5e6a9dd443
@ -23,6 +23,7 @@ class CorsMiddleware extends BaseMiddleware
|
|||||||
$response = $response->withHeader('Access-Control-Allow-Origin', '*');
|
$response = $response->withHeader('Access-Control-Allow-Origin', '*');
|
||||||
$response = $response->withHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
$response = $response->withHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
||||||
$response = $response->withHeader('Access-Control-Allow-Headers', '*');
|
$response = $response->withHeader('Access-Control-Allow-Headers', '*');
|
||||||
|
$response = $response->withStatus(204);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user