diff --git a/packages/bruno-cli/src/runner/run-single-request.js b/packages/bruno-cli/src/runner/run-single-request.js index 50a30144..9b12e86a 100644 --- a/packages/bruno-cli/src/runner/run-single-request.js +++ b/packages/bruno-cli/src/runner/run-single-request.js @@ -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, diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index b1195582..c4577bf3 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -72,7 +72,7 @@ const getEnvVars = (environment = {}) => { }; }; -const protocolRegex = /([a-zA-Z]{2,20}:\/\/)(.*)/; +const protocolRegex = /^([-+\w]{1,25})(:?\/\/|:)/; const configureRequest = async ( collectionUid,