     ring.middleware.file-info
     ring.middleware.content-type
     ring.middleware.not-modified
+    ring.middleware.keyword-params
     ring.middleware.params
     ring.util.io
     ring.middleware.session

  (->
    handler
    (wrap-url-params) ; Custom url-parametrization
    (wrap-keywords-params)
    (wrap-params)
    (wrap-session)
    (wrap-cookies)
    (wrap-resource (or (:static settings) "./"))
    (wrap-file-info)
    (wrap-content-type)

        ; The rest are passed on as options to the Ring server.
        ; All are optional. Pass in just a number if you want.
        (let [settings {:static (:static options)} 
              new-options (dissoc options 
                                  :static
                                  :cljs-input
                                  :cljs-output)
              static (:static options)
              input-path (or (:cljs-input options) static)
              output-path (or (:cljs-output options) static)]
          (do
          (if 
            (and input-path output-path) 
            (cljs.closure/build input-path {:output-to (output-path) 
                                            :optimizations :advanced})
            (when 
              (or input-path output-path) 
              (throw "You need both a :cljs-input and a :cljs-output")))
          (run-server (wrap-app handler settings) new-options)))))


; (def-handler handle [request]
