Don't throw exceptions for localhost in CORSHelper.

This commit is contained in:
Robert Elder 2014-10-27 15:07:12 +00:00
parent 23cbd80e09
commit a88c0233d6
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class CORSHelper
//Chrome sends the Origin header for all requests, so we whitelist the webserver's hostname as well.
$response = $response->setHeader('Access-Control-Allow-Origin', '*');
$origin = $request->getHeader('Origin');
if (($origin != "") &&
if ((!(preg_match("/https?:\/\/localhost/", $origin) === 1)) && ($origin != "") &&
(!in_array($origin,
array("http://www.airtime.pro",
"https://www.airtime.pro",