mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
This commit is contained in:
@@ -17,6 +17,8 @@ const { SocksProxyAgent } = require('socks-proxy-agent');
|
||||
const { makeAxiosInstance } = require('../utils/axios-instance');
|
||||
const { shouldUseProxy, PatchedHttpsProxyAgent } = require('../utils/proxy-util');
|
||||
|
||||
const protocolRegex = /([a-zA-Z]{2,20}:\/\/)(.*)/;
|
||||
|
||||
const runSingleRequest = async function (
|
||||
filename,
|
||||
bruJson,
|
||||
@@ -81,6 +83,10 @@ const runSingleRequest = async function (
|
||||
// interpolate variables inside request
|
||||
interpolateVars(request, envVariables, collectionVariables, processEnvVars);
|
||||
|
||||
if (!protocolRegex.test(request.url)) {
|
||||
request.url = `http://${request.url}`;
|
||||
}
|
||||
|
||||
const options = getOptions();
|
||||
const insecure = get(options, 'insecure', false);
|
||||
const httpsAgentRequestFields = {};
|
||||
|
||||
Reference in New Issue
Block a user