Prefer content-dir files over classpath (like /content/stylesheet.css)

This commit is contained in:
Vlad Bokov 2019-01-18 07:05:19 +07:00
parent 1136e792d4
commit 3542ac9146
No known key found for this signature in database
GPG key ID: 4D88DD3A10EA1D63
2 changed files with 2 additions and 1 deletions

View file

@ -97,6 +97,7 @@
[xss-protection?]
(-> site-defaults
(update-in [:session] merge session-defaults)
(dissoc :static)
(assoc-in [:security :anti-forgery] xss-protection?)))

View file

@ -50,9 +50,9 @@
(def production-middleware
[#(wrap-internal-error % :log (fn [e] (timbre/error e)))
#(wrap-resource % "public")
#(wrap-file % util/content-dir
{:index-files? false :prefer-handler? true})
#(wrap-resource % "public")
#(wrap-content-type %)
#(wrap-not-modified %)])