   (:require [clojure.data.json :as json]
             [clojure.edn       :as edn]
             [clojure.string    :as str]
+            [clojure.set       :refer [intersection]]
             [ring.middleware.absolute-redirects :refer [wrap-absolute-redirects]]
             [ring.middleware.content-type       :refer [wrap-content-type]]
             [ring.middleware.default-charset    :refer [wrap-default-charset]]

        (handler (assoc request :params (merge params get-params post-params))))
      (handler request))))

(defn wrap-session-params [handler]
  (fn [{:keys [session] :as request}]
    (handler (update request :params merge session))))

(defn wrap-exceptions [handler]

(defn wrap-common [handler]
  (-> handler
      wrap-request-logging
      wrap-merge-session
      wrap-keyword-params
      wrap-edn-params
      wrap-json-params
      wrap-nested-params
      wrap-multipart-params
      wrap-params
      wrap-session
      wrap-absolute-redirects
