mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-22 14:41:04 +01: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:
parent
dc39538d02
commit
98b45a2fd4
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user