On chrome browser, ajax can only visit websites with CORS headers. But on Electron APP, we can easily bypass this restriction.
The BrowserWindow
has an webPreferences.webSecurity
option. We can turn off it:
const win = new BrowserWindow({
webPreferences: {
webSecurity: false
}
})
Now we can freely run crawler codes on the render process.