diff --git a/lib/utils/index.js b/lib/utils/index.js index 45fd84fc..63d5dbfc 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -741,8 +741,8 @@ function build_distribution_domain(source, options) { throw new Error('Must supply cloud_name in tag or in configuration'); } - const ssl_detected = consumeOption(options, "ssl_detected", config().ssl_detected); - let secure = consumeOption(options, 'secure', config().secure); + let secure = consumeOption(options, 'secure', null); + const ssl_detected = consumeOption(options, 'ssl_detected', config().ssl_detected); if (secure === null) { secure = ssl_detected || config().secure; } diff --git a/lib/v2/search.js b/lib/v2/search.js index dfde4958..87b1ae55 100644 --- a/lib/v2/search.js +++ b/lib/v2/search.js @@ -152,7 +152,7 @@ const Search = class Search { const dataOrderedByKey = sort_object_by_key(clear_blank(query)); const encodedQuery = base64Encode(JSON.stringify(dataOrderedByKey)); - const urlPrefix = build_distribution_domain(options); + const urlPrefix = build_distribution_domain(options.source, options); const signature = compute_hash(`${urlTtl}${encodedQuery}${apiSecret}`, 'sha256', 'hex');