fix: respect environment variable in url before adding protocol - resolved #2084
This commit is contained in:
@@ -348,7 +348,10 @@ const newSendRequest = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ensureMethodInEndpoint = () => {
|
const ensureMethodInEndpoint = () => {
|
||||||
if (!/^http[s]?:\/\//.test(newEndpoint.value)) {
|
if (
|
||||||
|
!/^http[s]?:\/\//.test(newEndpoint.value) &&
|
||||||
|
!newEndpoint.value.startsWith("<<")
|
||||||
|
) {
|
||||||
const domain = newEndpoint.value.split(/[/:#?]+/)[0]
|
const domain = newEndpoint.value.split(/[/:#?]+/)[0]
|
||||||
if (domain === "localhost" || /([0-9]+\.)*[0-9]/.test(domain)) {
|
if (domain === "localhost" || /([0-9]+\.)*[0-9]/.test(domain)) {
|
||||||
setRESTEndpoint("http://" + newEndpoint.value)
|
setRESTEndpoint("http://" + newEndpoint.value)
|
||||||
|
|||||||
1
packages/hoppscotch-app/vue2-shim.d.ts
vendored
1
packages/hoppscotch-app/vue2-shim.d.ts
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable import/export */
|
||||||
// workaround for Volar to infer the ref type in <template>
|
// workaround for Volar to infer the ref type in <template>
|
||||||
// https://github.com/johnsoncodehk/volar/issues/404
|
// https://github.com/johnsoncodehk/volar/issues/404
|
||||||
declare module "@vue/runtime-dom" {
|
declare module "@vue/runtime-dom" {
|
||||||
|
|||||||
Reference in New Issue
Block a user