figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
avg 2017-05-30T21:25:45.223219Z

Hello, guys! I'm a newbie at Clojure world, but I really like it. I have a problem with figwheel dev server CORS. It should be a ubiquitous problem, but I can't find a ready solution. I'm developing front-end with reagent/re-frame and I have java spring back-end developed by another person. So when I'm trying to send any requests to the server-side, I got 401 on OPTIONS request. A possible way to solve CORS problem is to set 'Access-Control-Allow-Origin: *' header, but it's insecure. So I want to deal with dev server itself. As I understand, I need something like a proxy, that will modify 'Origin' header of all requests made from UI to server-side, setting acceptable header value. Does it make sense? Anyway, could you please share practices you use and forward me to the right direction? Thank you! PS: maybe it just makes sense to enable CORS on the server-side in dev mode and disable in production...