aboutsummaryrefslogtreecommitdiff
path: root/weeb
diff options
context:
space:
mode:
authorJakob L. Kreuze2026-07-11 16:40:02 -0400
committerJakob L. Kreuze2026-07-12 16:06:28 -0400
commit0290452fb61145587dc74e11925e9b4eb9160d83 (patch)
tree7aabfad811332e2e589674ca50997ac2d070207f /weeb
parent1e3eff419ee6acff05e5acf5476cb39e0d29e0a4 (diff)
URI anchoring fix
Diffstat (limited to 'weeb')
-rw-r--r--weeb/router.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/weeb/router.scm b/weeb/router.scm
index 689084a..20f129d 100644
--- a/weeb/router.scm
+++ b/weeb/router.scm
@@ -37,7 +37,10 @@
(substring template 1 (- (string-length template) 1))
(substring template 1))
#\/)))
- (values (string-append "/" (string-join (map cadr components) "/"))
+ (values (string-append "^/"
+ (string-join (map cadr components) "/")
+ (if trailing-slash? "/?" "")
+ "$")
(filter symbol? (map car components))))
(define (handle-route request route-object)

© 2015 - 2026 Jakob L. Kreuze