Skip to content

Commit

Permalink
Allow for dynamic base_path (Velocidex#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwarwick-r7 authored Jan 9, 2023
1 parent f0d0bb6 commit 0bf08e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gui/velociraptor/src/components/core/api-service.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ axiosRetry(axios, {
});

let base_path = window.base_path || "";
if (base_path === "") {
let pname = window.location.pathname;
base_path = pname.replace(/\/app.*$/, "");
}

// In development we only support running from /
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
Expand Down

0 comments on commit 0bf08e2

Please sign in to comment.