Electron (chromium) disable web security

Viewed 23665

Is there a way to disable web security on Electron (chromium)? Via JavaScript or something?

4 Answers

  mainWindow = new BrowserWindow({
    height: 563,
    useContentSize: true,
    width: 1000,
    webPreferences: { webSecurity: false }
  })

import { app, BrowserWindow } from 'electron'

  mainWindow = new BrowserWindow({
    height: 563,
    useContentSize: true,
    width: 1000,
    webPreferences: { webSecurity: false }
  })

This is the solution, and it works for me.

Related