fix: update API endpoints to include /api prefix

This commit is contained in:
2026-05-05 18:50:11 +08:00
parent 1323da55a6
commit 9c64282ad5
3 changed files with 3 additions and 3 deletions

View File

@@ -446,7 +446,7 @@ export default {
const token = getCookie('token');
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const target = __APP_TARGET__;
const wsUrl = `${wsProtocol}//${target}/frpcAct/instanceMgr/logs?instanceID=${instanceID.value}&token=${token}`;
const wsUrl = `${wsProtocol}//${target}/api/frpcAct/instanceMgr/logs?instanceID=${instanceID.value}&token=${token}`;
logSocket = new WebSocket(wsUrl);

View File

@@ -62,7 +62,7 @@ export default {
const token = getCookie('token');
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const target = __APP_TARGET__;
const wsUrl = `${wsProtocol}//${target}/system/getLogs?token=${token}`;
const wsUrl = `${wsProtocol}//${target}/api/system/getLogs?token=${token}`;
socket.value = new WebSocket(wsUrl);

View File

@@ -13,7 +13,7 @@ export default defineConfig({
port: 3000,
proxy: {
'/api': {
target: `http://${APP_TARGET}`,
target: `http://${APP_TARGET}/api`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}