summaryrefslogtreecommitdiff
path: root/src/origin_check.clj
blob: 3dada54900411a2d9496901f9548201ddfd2a784 (plain)
1
2
3
4
5
6
7
8
9
(ns origin-check)

(defn with-origin-check
  "Middleware to validate that state-changing URL access
   originated from a page in the local domain."
  [handler]
  (fn [request]
    (println (get-in request [:headers]))
    (handler request)))