开发时设置的proxy 在使用 electron- builder打包之后无法使用,在开发时都是一切正常。
打包后,所有域名变成了 app://. ; 导致所有后端的API无法使用。
以下是 function createWindow() 里的相关设置
if (isDevelopment) {
mainWindow.loadURL('http://127.0.0.1:3000');
mainWindow.webContents.openDevTools();
} else {
createProtocol('app');
mainWindow.loadURL('app://./index.html');
}
请问在如何正确设置proxy,才能在打包后正常使用API?
请求用的什么