History

Let the e2e viewer bind a specific host (HOST env)

Defaults to all-interfaces as before. Setting HOST=127.0.0.1 binds loopback so the viewer can sit behind a `tailscale serve` proxy without colliding with tailscaled's own bind on the tailnet IP:port.

Rhys Sullivan committed 5 months ago

Commit 4803f0c1 parent c888e901 file · +3 −1Browse files

Unified · Split

e2e/scripts/serve.ts+3−1
@@ -78,4 +78,6 @@ createServer((req, res) => { · 77 unmodified lines
78 }78 }
79 res.writeHead(200, { "content-type": type, "content-length": size, "accept-ranges": "bytes" });79 res.writeHead(200, { "content-type": type, "content-length": size, "accept-ranges": "bytes" });
80 createReadStream(file).pipe(res);80 createReadStream(file).pipe(res);
81}).listen(PORT, () => console.log(`e2e viewer → http://localhost:${PORT}/`));81}).listen(PORT, process.env.HOST || undefined, () =>
82 console.log(`e2e viewer → http://${process.env.HOST ?? "localhost"}:${PORT}/`),
83);