Skip to content

Commit abeffaa

Browse files
committed
request custom headers when options.sig
1 parent 964dc1c commit abeffaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export function prepareRequestOptions(request_options, options) {
147147
if (proxy && proxy.timeout > 0) {
148148
request_options.timeout = proxy.timeout > 100 ? proxy.timeout : proxy.timeout * 1000;
149149
}
150-
if (proxy.sig && options.getSigHeaders) {
150+
if (proxy.sig) {
151151
request_sig = true;
152152
}
153153
}
@@ -180,7 +180,7 @@ export function prepareRequestOptions(request_options, options) {
180180

181181
setCookieFromJar(uri, request_options.headers, options?.jar)
182182

183-
if (request_sig) {
183+
if ((options.sig || request_sig) && options.getSigHeaders) {
184184
options.getSigHeaders(original_uri, function(error, headers) {
185185
if (error) {
186186
// Skip error.

0 commit comments

Comments
 (0)