How can we fake an Electron app's window URL (window.location)?


F.e., I normally load my renderer process with


but I’d like for the application to see window.location.href as, or similar.

How can I fake that, so that the app doesn’t know it is running on a file:// URL, but instead thinks it is on an http:// URL?


Can we use webContents.session.setProxy for this?