Skip to content

[Bug]: Load http image in webview that has https content(url) loaded #29992

@mehtaVishwa1996

Description

@mehtaVishwa1996

Preflight Checklist

Electron Version

12.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10

What arch are you using?

x64

Last Known Working Electron version

2

Expected Behavior

I want to load an http image over https url in webview.

Actual Behavior

When I am trying to load an http image in webview that has a https url loaded, it throws me following error

Mixed Content: The page at 'https://www.zygal.io/ (url hosted on https)' was loaded over HTTPS, but requested an insecure element 'http://49.248.73.8:41402/... (some image hosted on http)'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html

I have all options set on my webview tag as follows -
<webview src="https://www.zygal.io/" webpreferences="contextIsolation=false, webSecurity=false, allowRunningInsecureContent, allowDisplayingInsecureContent" nodeintegration enableremotemodule disableWebSecurity></webview>

Also have set options while calling browserWindow as follows -

new BrowserWindow({
		webPreferences: {
			devTools: true,
			nodeIntegration: true,
  			contextIsolation: false,
                       enableRemoteModule: true,
                       webviewTag: true,
                       webSecurity: false,
                       allowRunningInsecureContent: true,
                       allowDisplayingInsecureContent: true
		}
	});

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions