fix: update API endpoints to include /api prefix
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user