Only do CORSHeaders if there is more than 1 server

pull/1222/head
Isaac Connor 2016-01-04 09:38:24 -05:00
parent d256530896
commit f72260733c
1 changed files with 2 additions and 1 deletions

View File

@ -100,7 +100,8 @@ function CORSHeaders() {
# The following is left for future reference/use.
$valid = false;
$servers = dbFetchAll( 'SELECT * FROM Servers' );
if ( ! sizeof($servers) ) {
if ( sizeof($servers) <= 1 ) {
# Only need CORSHeaders in the event that there are multiple servers in use.
return;
}
foreach( dbFetchAll( 'SELECT * FROM Servers' ) as $row ) {