mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Return status code 204 for CORS OPTIONS requests (references #681)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user