From f1442eba9094e529fc70b61d4ff1cd3b952efb1e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 14 Sep 2018 14:56:26 -0400 Subject: [PATCH] once we have found a match for our origin, break out of loop --- web/includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 744cf0bdb..e66139d7c 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -51,10 +51,11 @@ function CORSHeaders() { $valid = true; header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']); header('Access-Control-Allow-Headers: x-requested-with,x-request'); + break; } } - if ( ! $valid ) { - Warning( $_SERVER['HTTP_ORIGIN'] . ' is not found in servers list.' ); + if ( !$valid ) { + Warning($_SERVER['HTTP_ORIGIN'] . ' is not found in servers list.'); } } }