Skip to content

Instantly share code, notes, and snippets.

@patientplatypus
Created September 20, 2019 14:07
Show Gist options
  • Save patientplatypus/e78c5c4097c30e7ee7ad1c0d00b53f6c to your computer and use it in GitHub Desktop.
Save patientplatypus/e78c5c4097c30e7ee7ad1c0d00b53f6c 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