diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/ImportRestQueriesModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/ImportRestQueriesModal.svelte
index 8a34edade0..cbf4274690 100644
--- a/packages/builder/src/components/backend/DatasourceNavigator/modals/ImportRestQueriesModal.svelte
+++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/ImportRestQueriesModal.svelte
@@ -7,7 +7,6 @@
Layout,
Tabs,
Tab,
- Input,
Heading,
TextArea,
Dropzone,
@@ -98,15 +97,16 @@
Import your rest collection using one of the options below
-
-
+
+
+
diff --git a/packages/server/src/api/controllers/query/import/sources/base/index.ts b/packages/server/src/api/controllers/query/import/sources/base/index.ts
index d1584093cf..5f0b203984 100644
--- a/packages/server/src/api/controllers/query/import/sources/base/index.ts
+++ b/packages/server/src/api/controllers/query/import/sources/base/index.ts
@@ -38,7 +38,11 @@ export abstract class ImportSource {
if (typeof url === "string") {
path = `${url}/${path}`
} else {
- path = `${url.origin}/${path}`
+ let href = url.href
+ if (href.endsWith("/")) {
+ href = href.slice(0, -1)
+ }
+ path = `${href}/${path}`
}
}
queryString = this.processQuery(queryString)
diff --git a/packages/server/src/api/controllers/query/import/sources/curl.ts b/packages/server/src/api/controllers/query/import/sources/curl.ts
index d72441ab12..a59b036467 100644
--- a/packages/server/src/api/controllers/query/import/sources/curl.ts
+++ b/packages/server/src/api/controllers/query/import/sources/curl.ts
@@ -74,7 +74,7 @@ export class Curl extends ImportSource {
getQueries = async (datasourceId: string): Promise => {
const url = this.getUrl()
const name = url.pathname
- const path = url.pathname
+ const path = url.origin + url.pathname
const method = this.curl.method
const queryString = url.search
const headers = this.curl.headers
@@ -90,7 +90,7 @@ export class Curl extends ImportSource {
name,
method,
path,
- url,
+ undefined,
queryString,
headers,
[],