This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-25
Channels
- # announcements (66)
- # aws (1)
- # beginners (60)
- # boot (6)
- # calva (80)
- # cider (3)
- # clj-kondo (14)
- # cljdoc (4)
- # cljs-dev (27)
- # clojure (65)
- # clojure-dev (24)
- # clojure-europe (13)
- # clojure-gamedev (3)
- # clojure-italy (3)
- # clojure-nl (21)
- # clojure-uk (35)
- # clojurescript (98)
- # cursive (25)
- # data-science (3)
- # datomic (10)
- # dirac (16)
- # duct (2)
- # events (2)
- # fulcro (39)
- # jobs-discuss (1)
- # malli (2)
- # other-languages (1)
- # pedestal (26)
- # re-frame (61)
- # reagent (1)
- # reitit (7)
- # shadow-cljs (230)
- # specter (1)
- # tools-deps (29)
- # vim (1)
- # yada (4)
Hi everyone. I am having trouble with AWS API Gateway and CORS in Pedestal. I am not sure how to make it work...
I have added the ::http/allowed-origins
to the service-map
but this is not working for me...
@hadilsabbagh18 Are your aws api's using an authorizer?
@hadilsabbagh18 On the apigateway resource have you clicked the "Enable CORS" dropdown?
@hadilsabbagh18 I use ::http/secure-headers {:content-security-policy-settings "script-src
@souenzzo What is my-bucket
supposed to be set to? My domain or the domain of the caller?
After returning a status code of 200 from my Lambda function, AWS then does this:
(3308d6aa-08fe-40c8-9e24-ac22487b359b) Method response headers: {Access-Control-Allow-Origin=, Access-Control-Expose-Headers=, Content-Type=text/plain, X-Amzn-Trace-Id=Root=1-5db34f42-39cc3ea420f2cc35a7ae7d3c;Sampled=0}
and returns a 404. I have been getting this for four days. Can anyone help me?I have my UI done in react. My backend is done Clojure. I use Pedestal as my server. I deployed my web app. After being deployed, I can access my site. However, If I stay in the page longer than 5 minutes, it comes back with
ErrorPanel.js:36 Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
this is in my react ui
My backend appears to be healthy with no warns/errors. THey run a healthy check heartbeat every 10seconds