Skip to content

Commit

Permalink
fix: respect environment variable in url before adding protocol - res…
Browse files Browse the repository at this point in the history
  • Loading branch information
liyasthomas committed Jan 24, 2022
1 parent 7869396 commit ee6d173
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/hoppscotch-app/components/http/Request.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,10 @@ const newSendRequest = async () => {
}
const ensureMethodInEndpoint = () => {
if (!/^http[s]?:\/\//.test(newEndpoint.value)) {
if (
!/^http[s]?:\/\//.test(newEndpoint.value) &&
!newEndpoint.value.startsWith("<<")
) {
const domain = newEndpoint.value.split(/[/:#?]+/)[0]
if (domain === "localhost" || /([0-9]+\.)*[0-9]/.test(domain)) {
setRESTEndpoint("http://" + newEndpoint.value)
Expand Down
1 change: 1 addition & 0 deletions packages/hoppscotch-app/vue2-shim.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable import/export */
// workaround for Volar to infer the ref type in <template>
// https://github.com/johnsoncodehk/volar/issues/404
declare module "@vue/runtime-dom" {
Expand Down

0 comments on commit ee6d173

Please sign in to comment.