2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 04:37:17 +08:00
Files
panel/web/settings/proxy-config.example.ts
2024-11-26 02:27:24 +08:00

30 lines
557 B
Go

const proxyConfigMappings: Record<ProxyType, ProxyConfig[]> = {
dev: [
{
prefix: '/api/ws',
target: 'ws://localhost:8888/api/ws',
secure: false
},
{
prefix: '/api',
target: 'http://localhost:8080/api'
}
],
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]
}