CEF Allow-running-insecure-content

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

CEF Allow-running-insecure-content

Postby bigN » Sat Jan 28, 2017 5:19 pm

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?
bigN
Techie
 
Posts: 10
Joined: Fri Dec 16, 2016 2:58 am

Re: CEF Allow-running-insecure-content

Postby fddima » Sat Jan 28, 2017 5:42 pm

Try CefRuntime.AddCrossOriginWhitelistEntry instead.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: CEF Allow-running-insecure-content

Postby bigN » Sat Jan 28, 2017 6:05 pm

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//
bigN
Techie
 
Posts: 10
Joined: Fri Dec 16, 2016 2:58 am

Re: CEF Allow-running-insecure-content

Postby fddima » Sat Jan 28, 2017 7:24 pm

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.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 21 guests