Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Unblock CORS for specific website?

  • No replies
  • 0 have this problem
  • 3 views
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?

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.