Add Base URI to Inspect API calls (#3190)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user