Skip to content

Instantly share code, notes, and snippets.

View deciduously's full-sized avatar
:bowtie:
Baking a pie

Ben Lovy deciduously

:bowtie:
Baking a pie
View GitHub Profile
(defn optify
"Helper that examines paths with the supplied prefix and either subs
in their cache-busting URLs or returns them unchanged."
[req prefix]
(fn [^String src]
(or (and (.startsWith src prefix)
(not-empty (link/file-path req src)))
src)))