diff --git a/web-app/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/InspectObject.tsx b/web-app/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/InspectObject.tsx index ec9ccd77d..6dad48140 100644 --- a/web-app/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/InspectObject.tsx +++ b/web-app/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/InspectObject.tsx @@ -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) => { diff --git a/web-app/src/screens/Console/Tools/Inspect.tsx b/web-app/src/screens/Console/Tools/Inspect.tsx index 25c0fee14..2bd2b4f1b 100644 --- a/web-app/src/screens/Console/Tools/Inspect.tsx +++ b/web-app/src/screens/Console/Tools/Inspect.tsx @@ -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) => {