Merge pull request #283 from KiranNiranjan/ELECTRON-156

Electron-156 (Updated Protocol Validation)
This commit is contained in:
Vikas Shashidhar
2018-01-02 12:51:38 +05:30
committed by GitHub

View File

@@ -291,17 +291,14 @@ function getUrlAndCreateMainWindow() {
* @param urlFromConfig
*/
function createWin(urlFromConfig) {
let protocol = '';
// add https protocol if none found.
let parsedUrl = nodeURL.parse(urlFromConfig);
if (!parsedUrl.protocol) {
protocol = 'https';
parsedUrl.protocol = 'https:';
parsedUrl.slashes = true
}
let url = nodeURL.format({
protocol: protocol,
slahes: true,
pathname: parsedUrl.href
});
let url = nodeURL.format(parsedUrl);
windowMgr.createMainWindow(url);
}