Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
Added allowedIPs option. Default value: array('127.0.0.1')
Browse files Browse the repository at this point in the history
  • Loading branch information
duplabe authored and cr0t committed Aug 18, 2010
1 parent 0055e08 commit f0e351b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions XWebDebugRouter.php
Expand Up @@ -438,6 +438,7 @@ public static function getInfo($data, $config = null)
class XWebDebugRouter extends CLogRoute
{
public $config = '';
public $allowedIPs = array('127.0.0.1');

public function collectLogs($logger, $processLogs = false)
{
Expand All @@ -450,6 +451,9 @@ public function processLogs($logs)
{
$app=Yii::app();
$config = array();

if( !in_array($app->request->getUserHostAddress(), $this->allowedIPs) ) return;

foreach (explode(',', $this->config) as $value)
{
$value = trim($value);
Expand Down

0 comments on commit f0e351b

Please sign in to comment.