feat: enhance WebSocket proxy with user connection management and status reporting
- Updated StudioOpts type to include infoList for user connection status. - Added rendering of connection info in createStudioAppListHtml. - Modified self-restart logic to use a specific app path. - Improved WebSocket connection handling in wsProxyManager, including user registration and ID management. - Implemented connection status checks and responses in UserV1Proxy. - Introduced renderServerHtml function to inject server data into HTML responses. - Refactored page-proxy request handling for better URL management.
This commit is contained in:
6
src/modules/html/render-server-html.ts
Normal file
6
src/modules/html/render-server-html.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export const renderServerHtml = (data: any, html: string) => {
|
||||
if (html.includes('<body>')) {
|
||||
return html.replace('<body>', `<body><script>window.__SERVER_DATA__ = ${JSON.stringify(data)}</script>`);
|
||||
}
|
||||
return html;
|
||||
}
|
||||
Reference in New Issue
Block a user