once we have found a match for our origin, break out of loop
This commit is contained in:
parent
d9b1d3ec11
commit
f1442eba90
|
@ -51,10 +51,11 @@ function CORSHeaders() {
|
||||||
$valid = true;
|
$valid = true;
|
||||||
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
|
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
|
||||||
header('Access-Control-Allow-Headers: x-requested-with,x-request');
|
header('Access-Control-Allow-Headers: x-requested-with,x-request');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! $valid ) {
|
if ( !$valid ) {
|
||||||
Warning( $_SERVER['HTTP_ORIGIN'] . ' is not found in servers list.' );
|
Warning($_SERVER['HTTP_ORIGIN'] . ' is not found in servers list.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue