Change flag usage
- `--ignore-certificate` to ignore invalid certificate errors, - `--insecure` to disable web security to allow mixed content
This commit is contained in:
parent
2a31561fda
commit
1b0351cd01
18
README.md
18
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
|
||||
};
|
||||
|
||||
|
|
|
@ -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/`
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
}
|
||||
|
|
|
@ -28,8 +28,8 @@ if (require.main === module) {
|
|||
.option('-m, --show-menu-bar', 'set menu bar visible, defaults to false')
|
||||
.option('-u, --user-agent <value>', '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 <value>', 'path to Chrome flash plugin, find it in `Chrome://plugins`')
|
||||
.parse(process.argv);
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue