Having some difficulty with CORS on yada. I'm following the documentation, but still getting Cross-Origin Request BLocked: ... Reason: missing token ‘content-type’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel
Here's what I have for :access-control
I was able to get rid of that error by changing to :allow-headers ["Content-Type"]
, but now Stripe Checkout is hitting A request was made of a resource using a request method not supported by that resource. clojure.lang.ExceptionInfo: Method Not Allowed {:status 405, :headers {"allow" "POST, OPTIONS"}}
. It doesn't say which method it tried and failed so I'm a bit confused
POST, HEAD, and OPTIONS are enabled and it should be doing a POST so I'm baffled
I have :allow-methods #{:post :options :head}
so why is it not reporting HEAD in the allow?
Now it worked without me changing anything and then when I changed some naming of symbols around then it stopped working. This is driving me nuts
Ha! Typical. The problem the whole time is that I didn't realize one of the uri parameters had a space in it from processing some text so it split it up into two malformed uris. I'm not sure why the error came about though
So I'm currently using java-http-clj for the http client because I tried that out before it was mentioned about using aleph since it is used in yada. That being said if I were to change it to that how exactly would I go about that? Is there a way to access the http client from the aleph code already being used or would I just be requiring aleph again explicitly and just creating a new client?
Any JUXT people around to answer the question at the end there?
The yada author is on holiday 😊
I think you can just require Aleph and go from there.
It isn't stateful, there's no client object.
Right, I'm asking if there would be any practical difference since java-http-clj has zero dependencies as it just wraps the Java http client that's already there.