This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) | |