Skip to content

Commit

Permalink
fix: setting request headers
Browse files Browse the repository at this point in the history
Resolve #1
  • Loading branch information
skick1234 committed Sep 10, 2023
1 parent 4d5fe1d commit 14fd0e0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ exports.checkArgs = (searchString, options = {}) => {
// Unlink requestOptions
obj.requestOptions = Object.assign({}, options.requestOptions);
// Unlink requestOptions#headers
if (obj.requestOptions.headers) {
obj.requestOptions.headers = clone(obj.requestOptions.headers);
}
obj.requestOptions.headers = obj.requestOptions.headers ? clone(obj.requestOptions.headers) : {};
const cookie = getPropInsensitive(obj.requestOptions.headers, 'cookie');
if (!cookie) {
setPropInsensitive(obj.requestOptions.headers, 'cookie', CONSENT_COOKIE);
Expand Down

0 comments on commit 14fd0e0

Please sign in to comment.