diff options
| -rw-r--r-- | src/redirectly/core.clj | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/redirectly/core.clj b/src/redirectly/core.clj index 8b7025f..55e002c 100644 --- a/src/redirectly/core.clj +++ b/src/redirectly/core.clj @@ -1,6 +1,7 @@ (ns redirectly.core (:require [carica.core :refer [config clear-config-cache!]] - [ring.util.response :as response])) + [ring.util.response :as response] + [clojure.string :refer [ends-with?]])) (def routes (config :routes)) @@ -20,7 +21,7 @@ :url))) (defmethod url :url [{to :to}] to) -(defmethod url :mmm [{[_ path] :to}] (str "//mmm.s-ol.nu" path)) +(defmethod url :mmm [{[_ path] :to}] (str "//mmm.s-ol.nu" path "/")) (defn handler [req] (if-let [route (some #(matches? % (:uri req)) routes)] |
