Skip to content

Commit

Permalink
Update the CORS configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Aug 2, 2023
1 parent 007145e commit 93e5364
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
|
*/

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']))
{
Expand Down

0 comments on commit 93e5364

Please sign in to comment.