debug('meet request. HTTP_ORIGIN: ' . $_SERVER['HTTP_ORIGIN'], true); // must be localhost if ( !isset($_SERVER['HTTP_ORIGIN']) && (strpos($_SERVER['HTTP_ORIGIN'], 'localhost') === false || strpos($_SERVER['HTTP_ORIGIN'], '127.0.0.1') === false) ) { $logger->debug('HTTP_ORIGIN is not set ', true); //throw new Exception('Request nao permitida!'); } } }