(opened in error)#441
Conversation
The viewer hardcoded `server.listen(port, "127.0.0.1")`, so on hosting platforms like Fly that route inbound traffic through a separate interface (`fly-local-6pn` WireGuard mesh) the connection arrived on a non-loopback address and got reset. Operators following the `deploy/fly/README` "fly proxy 3113:3113" instructions saw the `Connection reset by peer` reported in rohitg00#434. Add `resolveViewerHost()` that reads `AGENTMEMORY_VIEWER_HOST` and falls back to `127.0.0.1`, so the default loopback-only behaviour for local installs — which the v0.9.12 plaintext-bearer guard relies on — is unchanged. The Fly Dockerfile sets the env var to `::` so the viewer also listens on the machine's `fly-local-6pn` IPv6 interface. `fly.toml` is unchanged: port 3113 still isn't published, so the viewer remains reachable only through `fly proxy` (mTLS WireGuard). `test/viewer-host.test.ts` covers: - defaults to 127.0.0.1 when the env var is unset or empty - returns the configured value when set, trimming whitespace - `startViewerServer` actually binds to 127.0.0.1 by default - `startViewerServer` binds to the env-configured host (`::1`) Signed-off-by: wyh0626 <44987669+wyh0626@users.noreply.github.com>
|
@wyh0626 is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR fixes the Fly deployment proxy issue by making the viewer server host configurable. It adds an ChangesViewer host binding configuration
Possibly related PRs
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Opened by mistake. Please disregard.