fluxy-bot 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/supervisor/index.ts +4 -2
package/package.json
CHANGED
package/supervisor/index.ts
CHANGED
|
@@ -76,9 +76,11 @@ export async function startSupervisor() {
|
|
|
76
76
|
// Fluxy routes → proxy to fluxy Vite dev server
|
|
77
77
|
// Note: must check '/fluxy/' (with slash) to avoid matching '/fluxy_tilts.webm' etc.
|
|
78
78
|
if (req.url === '/fluxy' || req.url?.startsWith('/fluxy/')) {
|
|
79
|
-
|
|
79
|
+
// Rewrite bare /fluxy or /fluxy/ to /fluxy/fluxy.html — Vite dev defaults to index.html otherwise
|
|
80
|
+
const proxyPath = (req.url === '/fluxy' || req.url === '/fluxy/') ? '/fluxy/fluxy.html' : req.url;
|
|
81
|
+
console.log(`[supervisor] → fluxy Vite :${vitePorts.fluxy} | ${req.method} ${proxyPath}${proxyPath !== req.url ? ` (rewritten from ${req.url})` : ''}`);
|
|
80
82
|
const proxy = http.request(
|
|
81
|
-
{ host: '127.0.0.1', port: vitePorts.fluxy, path:
|
|
83
|
+
{ host: '127.0.0.1', port: vitePorts.fluxy, path: proxyPath, method: req.method, headers: req.headers },
|
|
82
84
|
(proxyRes) => {
|
|
83
85
|
res.writeHead(proxyRes.statusCode!, proxyRes.headers);
|
|
84
86
|
proxyRes.pipe(res);
|