         (files "/static/")
         (not-found "Unrecognized request path!\n"))
       (wrap-params)
-      (exception-catcher)))
+      (exception-catcher)
+      (add-headers)))

            (ring.middleware [params :refer (wrap-params)])
            [cheshire.core :refer :all]
            [wikia.common.logger :as log])
  (:import java.io.FileInputStream))

(def wikia-regex #"\w+")
(def top-dir-regex #"\w")

        (log/warn (str e))
        (status (response (str e)) 503)))))

(defn add-headers
  [handler]
  (fn [request]
    (let [response (handler request)]
      (header response "X-Served-By" hostname)
      (header response "X-Cache" "ORIGIN")
      (header response "X-Cache-Hits" "ORIGIN"))))

(defmulti image-file->response-object class)

(defmethod image-file->response-object java.io.File
