1

I'm using chrome.webRequest api to intercept xhr's and redirect to a saved blob i have in chrome.storage.local and get this error:

XMLHttpRequest cannot load http://test.com/bla.xml. The request was redirected
to a URL ('data:text/xml;base64,sdfkldsfjdslfjsfsjf') which has a disallowed 
scheme for cross-origin requests.

the chrome.webRequest api states that "Redirections to non-HTTP schemes such as data: are allowed."

I've tried adding data:* or : to the permissions in the manifest with no luck.

mildse7en
  • 522
  • 1
  • 8
  • 20

1 Answers1

0

Redirecting to data:-URIs is fully supported by the webRequest API (and you don't need the non-existent data:* permission for it).

Your requests failed because data:-URI access through XMLHttpRequest was not supported until Chrome 39. (Starting in Chrome 39, you will be able to fetch data:-URIs using XMLHttpRequest, see http://crbug.com/308768 for more info).

Rob W
  • 341,306
  • 83
  • 791
  • 678