Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
CORS issue for public endpoint (#1374)
Browse files Browse the repository at this point in the history
  • Loading branch information
binal-7span committed Oct 26, 2019
1 parent 77ae215 commit 324762c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function cors_get_allowed_origin($allowedOrigins, $requestedOrigin)
if (in_array($requestedOrigin, $allowedOrigins)) {
$allowedOrigin = $requestedOrigin;
} else if (in_array('*', $allowedOrigins)) {
$allowedOrigin = '*';
$allowedOrigin = !empty($requestedOrigin) ? $requestedOrigin : '*';
} else {
$allowedOrigin = null;
}
Expand Down

0 comments on commit 324762c

Please sign in to comment.