Skip to content

How to disable "web-security" in BrowserWindow? #384

@kurdin

Description

@kurdin

This is not working:

mainWindow = new BrowserWindow({
    width: 1100, 
    height: 800, 
    "web-preferences": {
      "web-security": false
    }
  });

Loading any external webpage with iframes will throw errors for every iframe on the page:
Sandbox access violation: Blocked a frame at "http://cnn.com" from accessing a frame at "null". The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.

This is not helping as well:

<iframe sandbox="none" src="http://cnn.com"></iframe>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions