mirror of
https://github.com/metosin/reitit.git
synced 2025-12-22 10:31:12 +00:00
.
This commit is contained in:
parent
c86f042f54
commit
54a26aded7
1 changed files with 2 additions and 0 deletions
|
|
@ -23,6 +23,8 @@
|
|||
path (.getPath uri)]
|
||||
(if-let [match (or (r/match-by-path router path)
|
||||
(if-let [trailing-slash-handling (:trailing-slash-handling (r/options router))]
|
||||
;; TODO: Maybe the original path should be added under some key in match,
|
||||
;; so it is easy for user to see if trailing slash "redirect" happened?
|
||||
(if (str/ends-with? path "/")
|
||||
(if (not= trailing-slash-handling :add)
|
||||
(r/match-by-path router (subs path 0 (dec (count path)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue