Migration Cleanup

This commit is contained in:
Caileb 2025-05-27 18:16:16 -05:00
parent d2c014e744
commit 84225a66f9
8 changed files with 224 additions and 354 deletions

View file

@ -118,16 +118,6 @@ function proxyMiddleware() {
return { middleware: router };
}
// Export WebSocket handler for compatibility
export const proxyWebSocketHandler = {
// http-proxy-middleware handles WebSocket internally
// These are kept for compatibility but won't be used
open: () => {},
message: () => {},
close: () => {},
error: () => {}
};
if (enabled) {
registerPlugin('proxy', proxyMiddleware());
} else {

View file

@ -76,7 +76,9 @@ async function handleStatsPage(req, res) {
const url = new URL(`${req.protocol}://${req.get('host')}${req.originalUrl}`);
if (url.pathname !== statsUIPath) return false;
try {
const html = await fs.readFile(path.join(__dirname, 'stats.html'), 'utf8');
// Load the stats UI from pages/stats/stats.html in the project root
const statsHtmlPath = path.join(rootDir, 'pages', 'stats', 'stats.html');
const html = await fs.readFile(statsHtmlPath, 'utf8');
res.status(200).type('html').send(html);
return true;
} catch (e) {