mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 22:17:20 +00:00
fix(settings): restore image tab scrolling and dev websocket routing
- route dashboard WebSocket traffic through /ws to avoid Vite HMR collisions - run the dev entrypoint with node so bun run dev stays stable in this repo - restore the Image settings scroll container contract and add regression coverage
This commit is contained in:
1 parent
36acf9f190
commit
7a783d0714
6 files changed
+132
-188
No files matched your search
@@ -36,6 +36,7 @@ export async function startServer(options: ServerOptions): Promise<ServerInstanc
|
||||
const server = http.createServer(app);
|
||||
const wss = new WebSocketServer({
|
||||
server,
|
||||
path: '/ws',
|
||||
maxPayload: 1024 * 1024, // 1MB hard limit to prevent DoS
|
||||
perMessageDeflate: false, // Prevent zip bomb attacks
|
||||
});
|
||||
@@ -88,7 +89,11 @@ export async function startServer(options: ServerOptions): Promise<ServerInstanc
|
||||
const { createServer: createViteServer } = await import('vite');
|
||||
const vite = await createViteServer({
|
||||
root: path.join(__dirname, '../../ui'),
|
||||
server: { middlewareMode: true },
|
||||
server: {
|
||||
middlewareMode: true,
|
||||
// Reuse the dashboard HTTP server for HMR in middleware mode.
|
||||
hmr: { server },
|
||||
},
|
||||
appType: 'spa',
|
||||
});
|
||||
app.use(vite.middlewares);
|
||||
|
||||
Reference in new issue
Block a user