wildcard hosts
This commit is contained in:
2
mine.php
2
mine.php
@@ -33,7 +33,7 @@ $ip=san_ip($_SERVER['REMOTE_ADDR']);
|
|||||||
$ip=filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
|
$ip=filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
|
||||||
|
|
||||||
// in case of testnet, all IPs are accepted for mining
|
// in case of testnet, all IPs are accepted for mining
|
||||||
if($_config['testnet']==false&&!in_array($ip,$_config['allowed_hosts'])) api_err("unauthorized");
|
if($_config['testnet']==false&&!in_array($ip,$_config['allowed_hosts'])&&!empty($ip)&&!in_array('*',$_config['allowed_hosts'])) api_err("unauthorized");
|
||||||
|
|
||||||
if($q=="info"){
|
if($q=="info"){
|
||||||
// provides the mining info to the miner
|
// provides the mining info to the miner
|
||||||
|
|||||||
Reference in New Issue
Block a user