Page 1 of 1

CEF Allow-running-insecure-content

PostPosted: Sat Jan 28, 2017 5:19 pm
by bigN
I am working with 3.2883.1539 cef version where I am loading web page over https .
However, I am getting the below error

Mixed Content: The page at 'https://***' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint
'http://dump-request.demoapp.cefglue.xilium.local/'. This request has been blocked; the content must be served over HTTPS.

I am appending the switch to the process as per below snippet, and i see in the console that it is properly added but it still doesn't work

protected override void OnBeforeChildProcessLaunch(CefCommandLine commandLine)
{
commandLine.AppendSwitch("allow-running-insecure-content");
}

Does anybody have any suggestions, or workarrounds on how to make it work?

Re: CEF Allow-running-insecure-content

PostPosted: Sat Jan 28, 2017 5:42 pm
by fddima
Try CefRuntime.AddCrossOriginWhitelistEntry instead.

Re: CEF Allow-running-insecure-content

PostPosted: Sat Jan 28, 2017 6:05 pm
by bigN
Thanks for quick reply, I have tried it and it still doesnt work

CefRuntime.AddCrossOriginWhitelistEntry("https://*****", "http", "dump-request.demoapp.cefglue.xilium.local", false);
Where I am trying to access from https:// to http//

Re: CEF Allow-running-insecure-content

PostPosted: Sat Jan 28, 2017 7:24 pm
by fddima
bigN wrote:Thanks for quick reply, I have tried it and it still doesnt work

CefRuntime.AddCrossOriginWhitelistEntry("https://*****", "http", "dump-request.demoapp.cefglue.xilium.local", false);
Where I am trying to access from https:// to http//


I see. It's internal CEF issue. You can track it at: https://bitbucket.org/chromiumembedded/cef/issues/1723

To workaround: register custom scheme handler on https.

ADD: You still should use AddCrossOriginWhitelistEntry.