mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Return Access-Control-Allow-Origin for all API (content) requests (references #681)
This commit is contained in:
parent
5e6a9dd443
commit
16b9e2c30a
@ -18,7 +18,12 @@ class JsonMiddleware extends BaseMiddleware
|
||||
}
|
||||
else
|
||||
{
|
||||
return $response->withHeader('Content-Type', 'application/json');
|
||||
// TODO: This belongs more to CorsMiddleware, but that handles currently OPTIONS (CORS preflight) requests...
|
||||
$response = $response->withHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
$response = $response->withHeader('Content-Type', 'application/json');
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user