summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-03 18:35:41 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-03 18:35:41 +0100
commit4896d8f4192a7f1473922475350c1675c05633da (patch)
treefa1d95e96de0b1b08ede2967c587c2d9b28091e9 /index.pl
parent7eaf0c9fc0a8b4be59923e7bb033a9fd8fa8951a (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.
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/index.pl b/index.pl
index 60436de..6dcee58 100644
--- a/index.pl
+++ b/index.pl
@@ -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 => {