File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/application/services/js-services/http Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 WorkspaceMemberProfileUpdate ,
1515} from '@/application/services/services.type' ;
1616import { getTokenParsed , invalidToken } from '@/application/session/token' ;
17+ import { getConfigValue } from '@/utils/runtime-config' ;
1718import {
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
You can’t perform that action at this time.
0 commit comments