remove extra db call cuz i sredundant
This commit is contained in:
parent
61827fec0c
commit
8ce7719a33
|
@ -92,12 +92,12 @@ function CORSHeaders() {
|
|||
# Only need CORSHeaders in the event that there are multiple servers in use.
|
||||
return;
|
||||
}
|
||||
foreach( dbFetchAll( 'SELECT * FROM Servers' ) as $row ) {
|
||||
foreach( $servers as $row ) {
|
||||
$Server = new Server( $row );
|
||||
if ( $_SERVER['HTTP_ORIGIN'] == $Server->Url() ) {
|
||||
$valid = true;
|
||||
header("Access-Control-Allow-Origin: " . $Server->Url() );
|
||||
header("Access-Control-Allow-Headers: x-requested-with,x-request");
|
||||
$valid = true;
|
||||
}
|
||||
}
|
||||
if ( ! $valid ) {
|
||||
|
|
Loading…
Reference in New Issue