diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-12-03 18:35:41 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-12-03 18:35:41 +0100 |
commit | 4896d8f4192a7f1473922475350c1675c05633da (patch) | |
tree | fa1d95e96de0b1b08ede2967c587c2d9b28091e9 | |
parent | 7eaf0c9fc0a8b4be59923e7bb033a9fd8fa8951a (diff) |
Allow arbitrary stop names without city prefix1.4.3
This fixes stops such as "Foostr.". Previously, dots were only supported in
stop names prefixed by a city name (/:city/*stop). As Mojolicious matches
routes in the order they appear in and proceeds once a match has been found,
allowing both /:city/*stop and later /*stop is not a problem.
-rw-r--r-- | index.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -694,10 +694,10 @@ get '/:city/<*stop>.html' => \&render_html; get '/:city/<*stop>.json' => \&render_json; get '/:city/<*stop>.png' => \&render_image; get '/:city/*stop' => \&handle_request; -get '/<:stop>.html' => \&render_html; -get '/<:stop>.json' => \&render_json; -get '/<:stop>.png' => \&render_image; -get '/:stop' => \&handle_request; +get '/<*stop>.html' => \&render_html; +get '/<*stop>.json' => \&render_json; +get '/<*stop>.png' => \&render_image; +get '/*stop' => \&handle_request; app->config( hypnotoad => { |