cljs-http
cljs-http copied to clipboard
&android= appended to all queries on chrome for android
if a query is issued from Chrome on an android device, every request gets an &android=<rand_int> param appended to the called url.
browsing the code i see it's a feature supposed to fix CORS on android:
(defn wrap-android-cors-bugfix [client]
(fn [request]
(client
(if (util/android?)
(assoc-in request [:query-params :android] (Math/random))
request))))
the problem is that with strict APIS, implemented with compojure-api for instance, every useless parameter sent by the client is unallowed, thus breaking the call.
If i switch chrome to "request desktop site" on my phone browser, every http call is working normally even though we're using CORS, so maybe this piece of code is outdated ?
if possible, could you at least make it optional ? Thank you very much.
Sure, PR welcome ...
be my guest ;-)