Electron - Not allowed to load local resource

后端 未结 10 1970
夕颜
夕颜 2020-12-28 14:05

Evening,
I\'m looking into using electron to package an existing angular2 build. I thought I had a dry run working but the actual packaging seems to be failing (see fina

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 14:38

    Just change the BrowserWindow' options: new BrowserWindow({ webPreferences: { webSecurity: false } }) If window's url points to a remote source, like http://..., browser will not allow to load local resource, unless you set the options above.

提交回复
热议问题