fix: route IM clients through current origin
Deploy im-webapp production / deploy (push) Successful in 1m35s
Deploy im-webapp production / deploy (push) Successful in 1m35s
This commit is contained in:
@@ -22,3 +22,16 @@ test('login page exposes no tenant switch and rejects stale tenant state', async
|
||||
assert.match(login, /企业码:\{FIXED_TENANT_CODE\}/);
|
||||
assert.doesNotMatch(login, />\s*切换企业\s*</);
|
||||
});
|
||||
|
||||
test('websocket fallback uses the current browser host', async () => {
|
||||
const config = await source('src/lib/config.ts');
|
||||
|
||||
assert.match(config, /window\.location\.host/);
|
||||
assert.doesNotMatch(config, /web\.118im\.com/);
|
||||
});
|
||||
|
||||
test('local development proxies the same-origin websocket path', async () => {
|
||||
const vite = await source('vite.config.ts');
|
||||
|
||||
assert.match(vite, /['"]\/v0\/channels['"]\s*:\s*\{[^}]*ws:\s*true/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user