Fork me on GitHub
#pedestal
<
2020-08-14
>
subsaharancoder21:08:46

How do you setup up CORS in Pedestal http://pedestal.io/api/pedestal.service/io.pedestal.http.cors.html ? I'm noticing my browser to backend calls keep getting changed to OPTIONS

subsaharancoder21:08:37

figured this out 🙂 I just added

::http/allowed-origins (constantly true)
to the service-map 🙂

Joe Lane22:08:29

@johnwesonga that may be fine for dev, but you probably want something more secure for production

Joe Lane22:08:21

None right now, I’m mobile. But you basically just disabled cors and I don’t think you intended that for a prod workload.

ddeaguiar23:08:11

@johnwesonga sorry to hear that you’ve encountered issues while using Pedestal. Are you sure it’s the CORS interceptor that is changing your requests to OPTIONS ? Additional documentation regarding CORS configuration via the service map can be found in http://pedestal.io/reference/service-map#_description and http://pedestal.io/reference/service-map#_cors