cljs-ajax
cljs-ajax copied to clipboard
Redirect behaviour
Hi,
I am using cljs-ajax on a CLJ-project. I am requesting something from an API and it should return a 307 temporary redirect. The redirect location does return a url that does not accept the authentication headers that I needed for the original request. So I want to get the answer back extract the location and start a new request without the headers.
It seems to me that cljs-ajax does automatically resolve the redirect. Is this correct? How can I avoid that?
Thanks!
So here we run into one of the big problems with the project: there's no automated integration tests. I think the problem you're encountering is this: https://stackoverflow.com/questions/46993271/cors-ajax-or-xmlhttprequest-type-get-with-authorization-get-error-307
Without a decent way of reproducing the problem, though, I'm a little stuck.
Some reproduction available here: https://gist.github.com/TimoKramer/c61a457a0bca15273fb777bc3c781552
Yeah, the challenge is turning that into something that runs as a test during the travis build, for both Java and JavaScript. It's a big deal, sadly.