Hi All,
We’ve got trouble after switching to Cloudflare with our mobile app. It’s made on phonegap and actually its just a webview to our website. Website itself works fine, no problems, but when application tries to get specific auth url, it gets redirect to ourdomain/proxy and doesnt work couse we dont have that url on web site.
We have tried triggering off Browser Integrity Check in Firewall settings, but it didnt help. Have no other ideas why Cloudflare sends redirect to proxy url and does it specifically for phonegap app.
Any ideas? Thanks!
I dont think this issue is related to Cloudflare.
I did some some digging into Phonegap, and found the following issues/code:
opened 01:57PM - 13 Oct 16 UTC
bug
### PhoneGap CLI, node & npm versions
Phonegap 6.3.3, Node 4.6, npm 2.15.9
Ion… ic CLI has a local proxy where you can map local to remote proxy urls in a config file to avoid CSRF and CORS and related errors when doing local dev with a remote data source. http://blog.ionic.io/handling-cors-issues-in-ionic/
I can't get the phonegap cli --proxy switch to work with phonegap serve, and the doc is not very clear to me. Just adding /proxy/ to my urls didn't work, and I have tried a bunch of variations on that theme. If I want to always proxy requests at http://data.example.com so my local app in browser thinks its localhost data source, how do I do this? I would rather not disable Chrome security and use Ripple if at all possible. Thanks for any help.
/*!
* Module dependencies.
*/
var httpProxy = require('http-proxy'),
parse_url = require('url').parse,
proxy = new httpProxy.createProxyServer({
changeOrigin: true,
autoRewrite: true
});
/**
* Cross-Origin Requests Middleware.
*
* Add support for cross-origin resource requests by proxying all of the requests
* through this route. Each request includes an encoded path that is the original
* URL.
*
* Options:
*
This file has been truncated. show original
It looks like the redirect is caused by Phonegap somehow. Probably a Phonegap/misconfiguration issue?
Thanks for an idea, but I cant understand why and how it could be broken, since app starts working as soon as I turn Cloudflare off.
I’ll try to get network log from the app with enabled Cloudflare and disabled. I think some headers added which affect phonegap. Donno.
BTW is it possible to disable REVALIDATE 304 responce that Cloudflare sends?
I think (not sure) the trouble is connected with it.
system
Closed
October 24, 2018, 10:58pm
6
This topic was automatically closed after 14 days. New replies are no longer allowed.