- 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.
6 lines
226 B
TypeScript
6 lines
226 B
TypeScript
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;
|
|
} |