How to add a cors header to figwheel server for cljs?

Hi, I’m working on a ClojureScript application that I made from the re-frame lein template, so I work on it by having lein run the figwheel dev server on http://localhost:3000. My problem is that I want to make xhr requests to my dev Python server on localhost:8080, and am banging into the single-origin-policy, so I need to add a CORS “Access-Control-Allow-Credentials” header to the pages coming out from figwheel. I tried googling how to do this and have not had any luck, if anyone has the answer, that would be luvely!


If you are making requests to a Python server, I think the right place to add CORS header is the Python server, instead of the Figwheel server serving HTML file.

Ah, thanks, I always get my CORS messed up, as I do it once in a blue moon. I’ll try that!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.