You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,12 +170,20 @@ This can trigger client-side authentication interfaces, such as the browser auth
170
170
171
171
Setting `authenticate` to `true` adds the header `WWW-Authenticate: Basic`. When `false`, no header is added (default).
172
172
173
+
When `proxyMode` is `true` it will use the [`Proxy-Authenticate`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authenticate) header instead.
Setting the `proxyMode` to `true` will make the plugin implement [HTTP proxy authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Authentication#proxy_authentication), rather than resource authentication. In other words, the plugin will:
230
+
231
+
- read credentials from the `Proxy-Authorization` header rather than `Authorization`
232
+
- use `407` response status code instead of `401` to signal missing or invalid credentials
233
+
- use the `Proxy-Authenticate` header rather than `WWW-Authenticate` if the `authenticate` option is set
219
234
220
235
### `header` String (optional)
221
236
222
-
The `header` option specifies the header name to get credentials from for validation.
237
+
The `header` option specifies the header name to get credentials from for validation. If not specified it defaults to `Authorization` or `Proxy-Authorization` (according to the value of `proxyMode` option)
0 commit comments