Skip to content

Commit

Permalink
try fix cors reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Apr 29, 2024
1 parent 39a03a5 commit 216d497
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/APICore.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private function setAllowedOriginHeader() {
if( count( $this->AllowedOrigins ) === 1 && $this->AllowedOrigins[ 0 ] === "*" ) {
header( 'Access-Control-Allow-Origin: *' );
}
elseif( $this->isAllowedOrigin() ) {
header( 'Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN'] );
else if( $this->isAllowedOrigin() ) {
header( 'Access-Control-Allow-Origin: ' . ($_SERVER['HTTP_ORIGIN'] || '*') );
}
else {
header( "Access-Control-Allow-Origin: {$_SERVER['HTTP_HOST']}" );
Expand Down

0 comments on commit 216d497

Please sign in to comment.