Skip to content

Instantly share code, notes, and snippets.

@patientplatypus
Created September 20, 2019 14:09
Show Gist options
  • Save patientplatypus/8abd20c46f1895aa2b4cbec88a1161dd to your computer and use it in GitHub Desktop.
Save patientplatypus/8abd20c46f1895aa2b4cbec88a1161dd to your computer and use it in GitHub Desktop.
(defn wrap-preflight [handler]
(fn [request]
(do
(println "inside wrap-preflight")
(println "value of request")
(println request)
(println "value of handler")
(println handler)
(if (preflight? request)
{:status 200
:headers cors-headers
:body "preflight complete"}
(handler request)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment