Søg i 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?

  • Ingen svar
  • 0 har dette problem
  • 3 visninger
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?

Du skal logge ind på din konto for at svare på et indlæg. Start et nyt spørgsmål, hvis du ikke har en konto endnu.