Fork me on GitHub
#ring
<
2021-08-01
>
zackteo16:08:16

I am having cors issues with ring and even with the current setup ... after referencing https://stackoverflow.com/questions/58030830/clojure-cross-origin-error-totally-lost

(wrap-cors
       :access-control-allow-origin [#".*"]
       :access-control-allow-headers #{"accept"
                                       "accept-encoding"
                                       "accept-language"
                                       "authorization"
                                       "content-type"
                                       "origin"}
       :access-control-allow-methods [:get :put :post :delete])
but it still seems like there are issues? Not sure if I'm doing something wrong here or is the frontend(?)

seancorfield18:08:46

@zackteo It's usually just a matter of where in the middleware stack you put it. What other middleware are you using and how do you build your middleware stack and routes? The CORS stuff has to be pretty much the outermost layer.