Use absolute url instead of relative path for exports (#16724)

This commit is contained in:
Brainslug
2022-12-05 23:11:31 +01:00
committed by GitHub
parent b905741601
commit 939c5ab197

View File

@@ -221,7 +221,7 @@
<script lang="ts" setup>
import api from '@/api';
import { getRootPath } from '@/utils/get-root-path';
import { getPublicURL } from '@/utils/get-root-path';
import { notify } from '@/utils/notify';
import { readableMimeType } from '@/utils/readable-mime-type';
import { Filter } from '@directus/shared/types';
@@ -477,8 +477,7 @@ function exportDataLocal() {
const endpoint = collection.value.startsWith('directus_')
? `${collection.value.substring(9)}`
: `items/${collection.value}`;
const url = getRootPath() + endpoint;
const url = getPublicURL() + endpoint;
let params: Record<string, unknown> = {
access_token: api.defaults.headers.common['Authorization'].substring(7),