Fix CORS post

This commit is contained in:
Andros Fenollosa 2020-06-11 19:14:12 +02:00
parent 81d0b9e947
commit 0e5e981e79
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
(defproject api2smtp "1.0.2" (defproject api2smtp "1.0.3"
:description "Send emails through an Endpoint API" :description "Send emails through an Endpoint API"
:url "https://github.com/tanrax/api2smtp" :url "https://github.com/tanrax/api2smtp"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"

View File

@ -13,7 +13,7 @@
(wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false)) (wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false))
(wrap-cors (wrap-cors
:access-control-allow-origin [(re-pattern (if (config :debug) ".*" (config :domain)))] :access-control-allow-origin [(re-pattern (if (config :debug) ".*" (config :domain)))]
:access-control-allow-methods [:get]) :access-control-allow-methods [:get :post])
(#(if (config :debug) (wrap-reload %) %)))) (#(if (config :debug) (wrap-reload %) %))))
(defn -main [& args] (defn -main [& args]