mrmd-server 0.1.13 → 0.1.14
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/src/server.js +4 -3
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -309,11 +309,12 @@ export async function createServer(config) {
|
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
// Handle /sync/:port/:
|
|
312
|
+
// Handle /sync/:port/:path - proxy to local server (sync, pty, etc.)
|
|
313
313
|
const syncMatch = url.pathname.match(/^\/sync\/(\d+)\/(.+)$/);
|
|
314
314
|
if (syncMatch) {
|
|
315
|
-
const [, syncPort,
|
|
316
|
-
|
|
315
|
+
const [, syncPort, pathPart] = syncMatch;
|
|
316
|
+
// Preserve query string for PTY sessions
|
|
317
|
+
const targetUrl = `ws://127.0.0.1:${syncPort}/${pathPart}${url.search}`;
|
|
317
318
|
|
|
318
319
|
// Create connection to local sync server
|
|
319
320
|
const upstream = new WsClient(targetUrl);
|