Created
July 15, 2011 11:07
-
-
Save dbushenko/1084495 to your computer and use it in GitHub Desktop.
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
(defroutes main-routes | |
(GET "/request" request (str request)) | |
(GET "/my" request "<html><body>Привет, Мир!</body></html>") | |
(route/resources "/") | |
(route/not-found "Page not found")) | |
(defn wrap-codepage [handler] | |
(fn [request] | |
(handler (assoc-in request [:headers :content-type] "text/html; charset=utf-8")))) | |
(def app | |
(-> (handler/site main-routes) | |
(wrap-db-access *db*) | |
(wrap-file "public") | |
wrap-file-info | |
wrap-codepage | |
wrap-session)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment