Skip to content

Commit

Permalink
Add Base URI to Inspect API calls (minio#3190)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Valdivia <[email protected]>
  • Loading branch information
dvaldivia authored and cesnietor committed Jan 16, 2024
1 parent 1b52458 commit fcdc92e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
3 changes: 2 additions & 1 deletion web-app/src/screens/Console/Tools/Inspect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit fcdc92e

Please sign in to comment.