Skip to content

Commit 78b3da1

Browse files
fix: ssl_detected used from options if not configured before
1 parent 3b00b29 commit 78b3da1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/utils/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ function build_distribution_domain(source, options) {
741741
throw new Error('Must supply cloud_name in tag or in configuration');
742742
}
743743

744-
const ssl_detected = consumeOption(options, "ssl_detected", config().ssl_detected);
745-
let secure = consumeOption(options, 'secure', config().secure);
744+
let secure = consumeOption(options, 'secure', null);
745+
const ssl_detected = consumeOption(options, 'ssl_detected', config().ssl_detected);
746746
if (secure === null) {
747747
secure = ssl_detected || config().secure;
748748
}

lib/v2/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const Search = class Search {
152152
const dataOrderedByKey = sort_object_by_key(clear_blank(query));
153153
const encodedQuery = base64Encode(JSON.stringify(dataOrderedByKey));
154154

155-
const urlPrefix = build_distribution_domain(options);
155+
const urlPrefix = build_distribution_domain(options.source, options);
156156

157157
const signature = compute_hash(`${urlTtl}${encodedQuery}${apiSecret}`, 'sha256', 'hex');
158158

0 commit comments

Comments
 (0)