This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-04
Channels
- # architecture (27)
- # bangalore-clj (4)
- # beginners (22)
- # boot (35)
- # cider (26)
- # cljs-dev (2)
- # cljsrn (3)
- # clojure (156)
- # clojure-austria (3)
- # clojure-dev (9)
- # clojure-italy (25)
- # clojure-nl (10)
- # clojure-poland (5)
- # clojure-sanfrancisco (1)
- # clojure-spec (6)
- # clojure-uk (64)
- # clojurescript (169)
- # core-async (13)
- # cursive (13)
- # datomic (63)
- # dirac (50)
- # duct (21)
- # editors (1)
- # emacs (6)
- # events (1)
- # fulcro (1)
- # java (22)
- # keechma (14)
- # leiningen (2)
- # luminus (4)
- # off-topic (23)
- # onyx (4)
- # parinfer (5)
- # pedestal (4)
- # re-frame (6)
- # reagent (4)
- # ring-swagger (7)
- # rum (4)
- # shadow-cljs (84)
- # specter (5)
- # sql (36)
- # tools-deps (76)
- # uncomplicate (3)
- # yada (4)
Hi! I'm having CORS problems. I think I'm doing it correctly? The browser says
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at . (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
and I'm accessing from http://localhost:9000(def campaign-item-resource
(yada/resource
{:parameters {:path {:client_id String
:user_id String
:campaign_id String}}
:produces ["application/json"]
:access-control {:allow-origin ["" "" "" ""
"" ""]
:allow-credentials true :allow-headers ["authorization" "accept" "accept-language" "connection" "content-type" "host" "if-none-match" "origin" "referer" "user-agent"] :expose-headers #{"X-Custom"}}
:methods
{:get {:response get-email-campaign}
:put {:parameters {:body {:name String
:geo String
:autoaccept Boolean
:emails [String]}}
:consumes "application/json"
:response update-email-campaign}}}))
looking at the schema def for allow-origin here: https://github.com/juxt/yada/blob/f0f010548f7faacd9baa25c9eb7a14aafde0b424/src/yada/schema.clj#L345 ,try to put your domains in a set #{}