From e2d34723e5933e48ec44c702ecae783bb7a81fdd Mon Sep 17 00:00:00 2001 From: Preston Maness Date: Mon, 12 Jun 2023 00:10:33 -0500 Subject: [PATCH] Update tests, make sure old behaviour continues to work as expected --- src/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index b265b3a..e92ac18 100644 --- a/src/utils.js +++ b/src/utils.js @@ -42,7 +42,9 @@ const generateProxyURL = (type, data, opts) => { queryStrings.push(`${key}=${encodeURIComponent(data[key])}`) }) - return `${opts.proxy.scheme}://${opts.proxy.hostname}/api/2/get/${type}?${queryStrings.join( + const scheme = opts.proxy.scheme ? opts.proxy.scheme : 'https' + + return `${scheme}://${opts.proxy.hostname}/api/2/get/${type}?${queryStrings.join( '&' )}` }