Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/Plugin/AbstractPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()){
Expand Down Expand Up @@ -66,4 +74,4 @@ final public static function getSubscribedEvents(){
}
}

?>
?>