@dainprotocol/tunnel 1.1.7 → 1.1.8

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.
@@ -454,6 +454,10 @@ class DainTunnelServer {
454
454
  'Content-Encoding': 'identity', // Prevent compression middleware from buffering
455
455
  'Transfer-Encoding': 'chunked' // Ensure chunked encoding for streaming
456
456
  });
457
+ // CRITICAL: Flush headers immediately to establish SSE connection
458
+ // Without this, Node.js may buffer the headers, causing browser timeout
459
+ res.flushHeaders();
460
+ console.log(`[Tunnel Server] SSE headers flushed for ${sseId}`);
457
461
  console.log(`[Tunnel Server] SSE headers written for ${sseId}`);
458
462
  // Send initial connection event - MUST be sent immediately to prevent browser timeout
459
463
  res.write(': keepalive\n\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dainprotocol/tunnel",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "private": false,