diff --git a/config.yaml b/config.yaml index 2d3b99f..bb27b1d 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,5 @@ -domain: localhost +domain: "domain.com" +domain-cli: "domain.com" debug: true port: 7404 smtp-from: "no-reply@domain.com" diff --git a/project.clj b/project.clj index a6806f2..6c77b35 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject api2smtp "1.0.3" +(defproject api2smtp "1.0.4" :description "Send emails through an Endpoint API" :url "https://github.com/tanrax/api2smtp" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" diff --git a/src/api2smtp/core.clj b/src/api2smtp/core.clj index 5ef7dc6..2b36a09 100644 --- a/src/api2smtp/core.clj +++ b/src/api2smtp/core.clj @@ -12,7 +12,7 @@ (-> all-routes (wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false)) (wrap-cors - :access-control-allow-origin [(re-pattern (if (config :debug) ".*" (config :domain)))] + :access-control-allow-origin [(re-pattern (if (config :debug) ".*" (config :domain-cli)))] :access-control-allow-methods [:get :post]) (#(if (config :debug) (wrap-reload %) %))))