Skip to content

Conversation

dwwoelfel
Copy link

This allows you to pass a var as :access-control-allow-origin. It's nice in development because you can make changes to the function without having to restart the server.

Example:

(defn allow-origin? [req]
  (= (:uri req) "/my-cors-path"))
  
(wrap-cors handler :access-control-allow-origin #'allow-origin?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant