CORB blocking fetch() in whilelisted origin

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CORB blocking fetch() in whilelisted origin

Postby isaacsmile » Thu Aug 22, 2019 10:05 pm

Hi,

I'm using Javascript loaded on a custom scheme to fetch JSON from a server, which doesn't return CORS headers.

Previously it was working with appropriate CefAddCrossOriginWhitelist calls, e.g. CefAddCrossOriginWhitelist("customscheme://customhost", "https", "", true);

However now I get CORB blocked warnings (I'm using CEF on Windows with cef_binary_75.1.14+gc81164e+chromium-75.0.3770.100)

For reference my Javascript looks like:

const data = new URLSearchParams();
data.append('exampleKey', 'exampleValue');
fetch('https://example.com/some-url', { method: 'post', body: data }).then((response) => {
if (response.ok) {
return response.json();
}
});

The error I'm getting in the dev tools console is the following:
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://example.com/some-url with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details

What can I change to allow this response through? Currently it is being changed to an empty string (as described in the CORB document)
isaacsmile
Techie
 
Posts: 14
Joined: Thu Aug 24, 2017 8:27 pm

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 17 guests