diff --git a/README.md b/README.md index 0c8edbc..0f50ac5 100644 --- a/README.md +++ b/README.md @@ -228,18 +228,18 @@ By default, nativefier uses a preset user agent string for your OS and masquerad If this flag is passed, it will not override the user agent. +#### [ignore-certificate] + +``` +--ignore-certificate +``` +Forces the packaged app to ignore certificate errors. + #### [insecure] ``` --insecure ``` -Forces the packaged app to ignore certificate errors. - -#### [disable-web-security] - -``` ---disable-web-security -``` Forces the packaged app to ignore web security errors. #### [flash] @@ -250,7 +250,7 @@ Forces the packaged app to ignore web security errors. By default, nativefier will automatically try to determine the location of your Google Chrome flash binary. In the event that Flash does not appear to work, you can specify it directly with this command line flag, by retrieving the location of the Flash path from [chrome://plugins](chrome://plugins), under `Adobe Flash Player` > `Location`. -From my experience, it might be helpful to pass the `--disable-web-security` flag if you are using nativefied flash apps, as some `https` websites tend to serve flash insecurely. +From my experience, it might be helpful to pass the `--insecure` flag if you are using nativefied flash apps, as some `https` websites tend to serve flash insecurely. ## Programmatic API @@ -281,8 +281,8 @@ var options = { height: 800, showMenuBar: false, userAgent: null, + ignoreCertificate: false, insecure: false, - disableWebSecurity: false, honest: false }; diff --git a/app/src/components/mainWindow/mainWindow.js b/app/src/components/mainWindow/mainWindow.js index 1f19214..afccfb4 100644 --- a/app/src/components/mainWindow/mainWindow.js +++ b/app/src/components/mainWindow/mainWindow.js @@ -36,7 +36,7 @@ function createMainWindow(options, onAppQuit, setDockBadge) { plugins: true, // node globals causes problems with sites like messenger.com nodeIntegration: false, - webSecurity: !options.disableWebSecurity, + webSecurity: !options.insecure, preload: path.join(__dirname, 'static', 'preload.js') }, // after webpack path here should reference `resources/app/` diff --git a/app/src/main.js b/app/src/main.js index c78e2c3..3960479 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -22,7 +22,7 @@ if (appArgs.flashPluginDir) { app.commandLine.appendSwitch('ppapi-flash-path', flashPath); } -if (appArgs.insecure) { +if (appArgs.ignoreCertificate) { app.commandLine.appendSwitch('ignore-certificate-errors'); } diff --git a/src/build/buildApp.js b/src/build/buildApp.js index 9782c2f..7faa8b0 100644 --- a/src/build/buildApp.js +++ b/src/build/buildApp.js @@ -51,8 +51,8 @@ function selectAppArgs(options) { showMenuBar: options.showMenuBar, userAgent: options.userAgent, nativefierVersion: options.nativefierVersion, + ignoreCertificate: options.ignoreCertificate, insecure: options.insecure, - disableWebSecurity: options.disableWebSecurity, flashPluginDir: options.flashPluginDir }; } diff --git a/src/cli.js b/src/cli.js index a482dd4..ca82e5a 100755 --- a/src/cli.js +++ b/src/cli.js @@ -28,8 +28,8 @@ if (require.main === module) { .option('-m, --show-menu-bar', 'set menu bar visible, defaults to false') .option('-u, --user-agent ', 'set the user agent string for the app') .option('--honest', 'prevent the nativefied app from changing the user agent string to masquerade as a regular chrome browser') - .option('--insecure', 'ignore certificate related errors') - .option('--disable-web-security', 'enable loading of insecure content, defaults to false') + .option('--ignore-certificate', 'ignore certificate related errors') + .option('--insecure', 'enable loading of insecure content, defaults to false') .option('--flash ', 'path to Chrome flash plugin, find it in `Chrome://plugins`') .parse(process.argv); diff --git a/src/options/optionsMain.js b/src/options/optionsMain.js index 838bb5b..91d0d70 100644 --- a/src/options/optionsMain.js +++ b/src/options/optionsMain.js @@ -46,8 +46,8 @@ function optionsFactory(inpOptions, callback) { height: inpOptions.height || 800, showMenuBar: inpOptions.showMenuBar || false, userAgent: inpOptions.userAgent || getFakeUserAgent(), + ignoreCertificate: inpOptions.ignoreCertificate || false, insecure: inpOptions.insecure || false, - disableWebSecurity: inpOptions.disableWebSecurity || false, flashPluginDir: inpOptions.flash || null };