diff --git a/src/Plugin/AbstractPlugin.php b/src/Plugin/AbstractPlugin.php index 4aa22bc..2b5bc77 100644 --- a/src/Plugin/AbstractPlugin.php +++ b/src/Plugin/AbstractPlugin.php @@ -32,8 +32,16 @@ final public function route(ProxyEvent $event){ $url = $event['request']->getUri(); // url filter provided and current request url does not match it - if($this->url_pattern && strpos($url, $this->url_pattern) === false){ - return; + if($this->url_pattern){ + if(strpos($this->url_pattern, '/') === 0){ + if(!preg_match($this->url_pattern, $url)) + return; + } + else + { + if(stripos($url, $this->url_pattern) === false) + return; + } } switch($event->getName()){ @@ -66,4 +74,4 @@ final public static function getSubscribedEvents(){ } } -?> \ No newline at end of file +?>