mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-27 22:54:07 +00:00
refactor: protocol regex matches axios
Since axios is used for requests, it makes sense to match the protocol parsing with their code at https://github.com/axios/axios/blob/main/lib/helpers/parseProtocol.js Closes: #1152 Signed-off-by: Graham White <graham_alton@hotmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ 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 protocolRegex = /^([-+\w]{1,25})(:?\/\/|:)/;
|
||||
|
||||
const runSingleRequest = async function (
|
||||
filename,
|
||||
|
||||
@@ -72,7 +72,7 @@ const getEnvVars = (environment = {}) => {
|
||||
};
|
||||
};
|
||||
|
||||
const protocolRegex = /([a-zA-Z]{2,20}:\/\/)(.*)/;
|
||||
const protocolRegex = /^([-+\w]{1,25})(:?\/\/|:)/;
|
||||
|
||||
const configureRequest = async (
|
||||
collectionUid,
|
||||
|
||||
Reference in New Issue
Block a user