Update the CORS configuration

This commit is contained in:
Alex Tselegidis 2023-08-02 19:08:24 +02:00
parent 007145e213
commit 93e53649cb

View file

@ -82,7 +82,9 @@ header('X-Frame-Options: SAMEORIGIN');
|
*/
header('Access-Control-Allow-Origin: *'); // NOTICE: Change this header to restrict CORS access.
header('Access-Control-Allow-Origin: ' . ($_SERVER['HTTP_ORIGIN'] ?? '*')); // NOTICE: Change this header to restrict CORS access.
header('Access-Control-Allow-Credentials: "true"');
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
{