Skip to content

Commit e55b61b

Browse files
committed
chore: add header
1 parent 291e0ef commit e55b61b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/application/services/js-services/http/http_api.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
WorkspaceMemberProfileUpdate,
1515
} from '@/application/services/services.type';
1616
import { getTokenParsed, invalidToken } from '@/application/session/token';
17+
import { getConfigValue } from '@/utils/runtime-config';
1718
import {
1819
Template,
1920
TemplateCategory,
@@ -1619,6 +1620,10 @@ export async function createImportTask(file: File) {
16191620
axiosInstance?.post<APIResponse<{ task_id: string; presigned_url: string }>>(url, {
16201621
workspace_name: fileName,
16211622
content_length: file.size,
1623+
}, {
1624+
headers: {
1625+
'X-Host': getConfigValue('APPFLOWY_BASE_URL', ''),
1626+
},
16221627
})
16231628
).then((data) => ({
16241629
taskId: data.task_id,
@@ -1656,7 +1661,11 @@ export async function createDatabaseCsvImportTask(
16561661
const url = `/api/workspace/${workspaceId}/database/import/csv`;
16571662

16581663
return executeAPIRequest<DatabaseCsvImportCreateResponse>(() =>
1659-
axiosInstance?.post<APIResponse<DatabaseCsvImportCreateResponse>>(url, payload)
1664+
axiosInstance?.post<APIResponse<DatabaseCsvImportCreateResponse>>(url, payload, {
1665+
headers: {
1666+
'X-Host': getConfigValue('APPFLOWY_BASE_URL', ''),
1667+
},
1668+
})
16601669
);
16611670
}
16621671

0 commit comments

Comments
 (0)