mirror of
https://github.com/grocy/grocy.git
synced 2026-04-10 14:36:16 +02: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-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
||||
$response = $response->withHeader('Access-Control-Allow-Headers', '*');
|
||||
$response = $response->withStatus(204);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user