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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.js +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrmd-server",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "HTTP server for mrmd - run mrmd in any browser, access from anywhere",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
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/:doc - proxy to local sync server
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, docName] = syncMatch;
316
- const targetUrl = `ws://127.0.0.1:${syncPort}/${docName}`;
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);