Closed lookyman closed 9 years ago
I noticed that when I have this "standard" router factory setup:
/** * @return \Nette\Application\IRouter */ public function createRouter() { $router = new RouteList(); $router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY); $router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default'); return $router; }
and in config:
webimages: routes: - 'images/<id>-<width>x<height>.jpg'
Then the <presenter>/<action>[/<id>] one somehow catches the image request and makes a whole lot of mess. Am I doing something wrong, or is it an issue?
<presenter>/<action>[/<id>]
When I actually PREPEND the webimages route, everything works fine. Maybe we should utilize something like https://github.com/Kdyby/Console/blob/master/src/Kdyby/Console/CliRouter.php#L124?
Implemented. It's possible to switch it off with prependRoutesToRouter: false if someone wants to plug it in manually in some custom fashion.
prependRoutesToRouter: false
I noticed that when I have this "standard" router factory setup:
and in config:
Then the
<presenter>/<action>[/<id>]
one somehow catches the image request and makes a whole lot of mess. Am I doing something wrong, or is it an issue?When I actually PREPEND the webimages route, everything works fine. Maybe we should utilize something like https://github.com/Kdyby/Console/blob/master/src/Kdyby/Console/CliRouter.php#L124?