Add Base URI to Inspect API calls (#3190)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2024-01-16 13:45:27 -08:00
committed by GitHub
parent b066b6a920
commit fc65f1afd1
2 changed files with 4 additions and 2 deletions

View File

@@ -66,7 +66,8 @@ const InspectObject = ({
const file = encodeURLString(inspectPath + "/xl.meta");
const volume = encodeURLString(volumeName);
const urlOfInspectApi = `/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;
let basename = document.baseURI.replace(window.location.origin, "");
const urlOfInspectApi = `${basename}/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;
makeRequest(urlOfInspectApi)
.then(async (res) => {

View File

@@ -146,7 +146,8 @@ const Inspect = () => {
const file = encodeURLString(inspectPath);
const volume = encodeURLString(volumeName);
const urlOfInspectApi = `/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;
let basename = document.baseURI.replace(window.location.origin, "");
const urlOfInspectApi = `${basename}/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;
makeRequest(urlOfInspectApi)
.then(async (res) => {