pedestal

subsaharancoder 2020-08-14T21:50:46.001400Z

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

subsaharancoder 2020-08-14T21:54:37.002400Z

figured this out 🙂 I just added

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

Joe Lane 2020-08-14T22:29:29.003400Z

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

subsaharancoder 2020-08-14T22:45:20.004200Z

@lanejo01 any pointers?

Joe Lane 2020-08-14T22:51:21.005500Z

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

2020-08-14T23:32:11.010600Z

@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