diff --git a/.env.template b/.env.template deleted file mode 100644 index c48e350..0000000 --- a/.env.template +++ /dev/null @@ -1 +0,0 @@ -VITE_CALDERA_URL=http://localhost:8888 diff --git a/src/main.js b/src/main.js index b72985b..81bd253 100644 --- a/src/main.js +++ b/src/main.js @@ -17,7 +17,6 @@ const app = createApp(App); const $api = axios.create({ withCredentials: true, }); -if (import.meta.env.DEV) $api.defaults.baseURL = "http://localhost:8888"; app.provide("$api", $api); app.use(createPinia()); diff --git a/src/router.js b/src/router.js index b974b3b..bdb9af3 100644 --- a/src/router.js +++ b/src/router.js @@ -23,7 +23,7 @@ import NotFoundView from "./views/NotFoundView.vue"; // Cant use global API variable because we aren't in a component const $api = axios.create({ withCredentials: true, - baseURL: import.meta.env.VITE_CALDERA_URL || "http://localhost:8888", + baseURL: window.location.origin, }); const router = createRouter({ @@ -113,11 +113,6 @@ const router = createRouter({ { path: '/docs/index.html', beforeEnter: () => { - // Redirect to the external docs page - if (!import.meta.env.PROD) { - window.location.href = (import.meta.env.VITE_CALDERA_URL || 'http://localhost:8888') + '/docs/index.html'; - return; - } window.location.href = '/docs/index.html'; } }, diff --git a/src/views/ExfilledFilesView.vue b/src/views/ExfilledFilesView.vue index 37d8a6f..8892ab1 100644 --- a/src/views/ExfilledFilesView.vue +++ b/src/views/ExfilledFilesView.vue @@ -48,7 +48,7 @@ function downloadSelectedFiles() { let filename = filePath.split(/[\/\\]/); filename = filename[filename.length - 1]; let uri = `${ - import.meta.env.VITE_CALDERA_URL || "http://localhost:8888" + window.location.origin }/file/download_exfil?file=${btoa(filePath)}`; let downloadAnchorNode = document.createElement("a"); downloadAnchorNode.setAttribute("href", uri);