Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Unblock CORS for specific website?

  • Geen antwoorden
  • 0 hebben dit probleem
  • 3 weergaven
more options

I was trying to develop an android app with Cordova, and test it locally in my browser. But, the browser won't allow me to fetch() from an external site, even though this behavior would be allowed if the same code runs as a native app. For development and testing purposes, is there a way to temporarily unblock CORS for a specific site?

I'd also love if this were something that were a standard permissions setting, just like you can grant access to the camera or to your location. Then we could make third-party clients for other popular sites without needing workarounds like a browser extension or a proxy server. Maybe there could be a warning like "app.com tried to fetch from example.com, but that site does not allow cross-origin resource sharing. fetch anyway?"

But honestly I'd just be happy with a way to unblock CORS for a single tab for development purposes. Is this already possible? If not, are there some other good ways to test a webview app?

I was trying to develop an android app with [https://cordova.apache.org/ Cordova], and test it locally in my browser. But, the browser won't allow me to fetch() from an external site, even though this behavior would be allowed if the same code runs as a native app. For development and testing purposes, is there a way to temporarily unblock CORS for a specific site? I'd also love if this were something that were a standard permissions setting, just like you can grant access to the camera or to your location. Then we could make third-party clients for other popular sites without needing workarounds like a browser extension or a proxy server. Maybe there could be a warning like "app.com tried to fetch from example.com, but that site does not allow cross-origin resource sharing. fetch anyway?" But honestly I'd just be happy with a way to unblock CORS for a single tab for development purposes. Is this already possible? If not, are there some other good ways to test a webview app?

U moet zich aanmelden bij uw account om op berichten te antwoorden. Stel een nieuwe vraag als u nog geen account hebt.