universal_access_from_file_urls flag not working on 2454 branch

Issue #1726 wontfix
Taeho Kim
created an issue

What steps will reproduce the problem?

  1. Set universal_access_from_file_urls on CefBrowserSettings to STATE_ENABLED
  2. Register scheme in CefApp::OnRegisterCustomSchemes: registrar->AddCustomScheme("app", true, true, false);
  3. Request external site with XMLHttpRequest, in the page from custom scheme
    var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://example.com/', true); xhr.send();
  4. Following error occurs: XMLHttpRequest cannot load https://example.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'app://example' is therefore not allowed access.

(Requesting from file:/// url instead of custom scheme works)

What is the expected output? What do you see instead?

The request should be sent successfully.

What version of the product are you using? On what operating system?

I tested with CEF 3.2454.1328.gc45b7de and CEF 3.2454.1304.ge979611. Also note that it works on 2357 branch.

Does the problem reproduce with the cefclient or cefsimple sample application at the same version? How about with a newer or older version?

Reproducible on CEF 3.2454.1328.gc45b7de / CEF 3.2454.1304.ge979611. Works well in 2357 branch.

Does the problem reproduce with Google Chrome at the same version? How about with a newer or older version?

Google Chrome doesn't have a flag equivalent to universal_access_from_file_urls.

Comments (3)

  1. Marshall Greenblatt

    Marking this as WontFix since it's likely a hard-coded Chromium/Blink CORS restriction applying to non-HTTP(S) schemes. Please report back if the problem reproduces with an HTTP scheme and we can re-visit the issue.

  2. Log in to comment