Cross Domain Ajax Call in Atom Shell

前端 未结 3 1175
小蘑菇
小蘑菇 2021-02-08 02:48

We are working with Atom Shell (Currently known as electron) to wrap a web application as desktop app and having trouble making cross domain ajax calls due to CORS restriction.

3条回答
  •  攒了一身酷
    2021-02-08 03:03

    Solutions' updated syntax:

    var BrowserWindow = require('browser-window');
    var win = new BrowserWindow({
        webPreferences: {webSecurity: false}
    });
    

提交回复
热议问题