feat: configurable bind hosts for iii-engine and viewer#376
Conversation
|
@eleboucher is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughAdds two environment variables: ChangesEnvironment Configuration Enhancements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 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 Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/viewer/server.ts`:
- Line 124: The displayHost logic is inverted: when host is "0.0.0.0" or "::"
the logged URL should show "localhost" not the raw host; update the ternary that
sets displayHost (the const displayHost = ... line) to return "localhost" for
those all-interface bind addresses and return host for other values so the
printed URL is usable in a browser.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ea0a8a69-cf32-4f7e-aa67-58832a6211f0
📒 Files selected for processing (3)
README.mdsrc/cli.tssrc/viewer/server.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/viewer/server.ts (1)
9-14:⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoffDocument
VIEWER_ALLOWED_ORIGINSenv var to support remote deployment.The PR enables custom host binding for remote deployment, but
ALLOWED_ORIGINSdefaults to hardcodedlocalhostand127.0.0.1. TheVIEWER_ALLOWED_ORIGINSenv var exists to override this, but it is not documented in the README. Remote deployments will require setting this env var explicitly, and users won't discover this without documentation or trial-and-error.Add documentation for the
VIEWER_ALLOWED_ORIGINSenv var (comma-separated list of allowed origins) to the README or deployment guide.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/viewer/server.ts` around lines 9 - 14, Add documentation for the VIEWER_ALLOWED_ORIGINS environment variable used to populate ALLOWED_ORIGINS (comma-separated list of allowed origins) so remote deployments know to set it rather than rely on the localhost defaults; update the README/deployment guide with a short section that describes the env var name VIEWER_ALLOWED_ORIGINS, expected format (e.g., "https://example.com,https://app.example.com"), examples for common deployment scenarios, and a note that it overrides the hardcoded localhost/127.0.0.1 defaults used by ALLOWED_ORIGINS in the viewer server.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/viewer/server.ts`:
- Around line 9-14: Add documentation for the VIEWER_ALLOWED_ORIGINS environment
variable used to populate ALLOWED_ORIGINS (comma-separated list of allowed
origins) so remote deployments know to set it rather than rely on the localhost
defaults; update the README/deployment guide with a short section that describes
the env var name VIEWER_ALLOWED_ORIGINS, expected format (e.g.,
"https://example.com,https://app.example.com"), examples for common deployment
scenarios, and a note that it overrides the hardcoded localhost/127.0.0.1
defaults used by ALLOWED_ORIGINS in the viewer server.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 26a7a266-6a81-4f05-8940-2c9083d0c236
📒 Files selected for processing (3)
README.mdsrc/cli.tssrc/viewer/server.ts
✅ Files skipped from review due to trivial changes (1)
- README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- src/cli.ts
Allow remove deployment by allowing custom bind host
Summary by CodeRabbit
New Features
Documentation