Custom regex fix

- Fixed issue with custom-regex maching both host-name and url (issue: #503).
- Changed TestRouter so host-name is always set.
This commit is contained in:
Simon Sessingø
2021-03-22 14:09:27 +01:00
parent d2b3ea4f54
commit 8a0f30c05e
3 changed files with 18 additions and 1 deletions
@@ -60,7 +60,7 @@ abstract class LoadableRoute extends Route implements ILoadableRoute
return null;
}
return ((bool)preg_match($this->regex, $request->getHost() . $url) !== false);
return ((bool)preg_match($this->regex, $url) !== false);
}
/**