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( '&' )}` }