2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:40:59 +08:00
Files
panel/web/settings/proxy-config.example.ts
2025-04-19 00:50:29 +08:00

34 lines
646 B
Go

const proxyConfigMappings: Record<ProxyType, ProxyConfig[]> = {
dev: [
{
prefix: '/api/ws',
target: 'ws://localhost:8888/api/ws',
changeOrigin: true,
secure: false,
ws: true
},
{
prefix: '/api',
target: 'http://localhost:8080/api',
changeOrigin: true,
secure: false
}
],
test: [
{
prefix: '/api',
target: 'http://localhost:8080/api'
}
],
prod: [
{
prefix: '/api',
target: 'http://localhost:8080/api'
}
]
}
export function getProxyConfigs(envType: ProxyType = 'dev'): ProxyConfig[] {
return proxyConfigMappings[envType]
}