fix: 修复websocket问题

This commit is contained in:
xlsea 2024-08-16 16:35:27 +08:00
parent 243de247f7
commit a50bb8c23f

View File

@ -12,9 +12,9 @@ export function createViteProxy(env: Env.ImportMeta, isDev: boolean) {
if (!isEnableHttpProxy) return undefined;
const { baseURL, proxyPattern, other } = createServiceConfig(env);
const { baseURL, proxyPattern, ws, other } = createServiceConfig(env);
const proxy: Record<string, ProxyOptions> = createProxyItem({ baseURL, proxyPattern });
const proxy: Record<string, ProxyOptions> = createProxyItem({ baseURL, ws, proxyPattern });
other.forEach(item => {
Object.assign(proxy, createProxyItem(item));