diff --git a/docs/api/app.md b/docs/api/app.md index f00b498d30c..fdc5cc9b72e 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -443,9 +443,7 @@ Adds `tasks` to the [Tasks][tasks] category of the JumpList on Windows. consists of two or more icons, set this value to identify the icon. If an icon file consists of one icon, this value is 0. -### `app.allowNTLMCredentialsForAllDomains(allow)` - -* `allow` Boolean +### `app.allowNTLMCredentialsForAllDomains()` Dynamically sets whether to always send credentials for HTTP NTLM or Negotiate authentication - normally, Electron will only send NTLM/Kerberos credentials for @@ -453,6 +451,8 @@ URLs that fall under "Local Intranet" sites (i.e. are in the same domain as you) However, this detection often fails when corporate networks are badly configured, so this lets you co-opt this behavior and enable it for all URLs. +**Note:** This method should be called before the `ready` event gets emitted. + ### `app.makeSingleInstance(callback)` * `callback` Function diff --git a/lib/browser/api/app.js b/lib/browser/api/app.js index 66ee0ac1e45..38b465688cf 100644 --- a/lib/browser/api/app.js +++ b/lib/browser/api/app.js @@ -22,6 +22,9 @@ Object.assign(app, { commandLine: { appendSwitch: bindings.appendSwitch, appendArgument: bindings.appendArgument + }, + allowNTLMCredentialsForAllDomains () { + this.commandLine.appendSwitch('auth-server-whitelist', '*') } })