fix(vanity-gateway): register /info on per-host sub-routers - #789
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe vanity gateway now serves version information at ChangesVanity gateway info endpoint
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
The hostRouter middleware routes requests by Host header to per-host sub-routers before they reach the main chi mux. GET /info was registered only on the main mux, so requests arriving with a vanity or OpenAI Host header hit the sub-router (which had no /info route) and returned 404. Add GET /info to the vanity and OpenAI sub-routers, matching the pattern already used for GET /health. Add tests that send requests with Host headers matching registered vanity and OpenAI domains to pin this. Relates to #315 Signed-off-by: priyaselvaganesan <pselvaganesa@nvidia.com>
priyaselvaganesan
force-pushed
the
fix/vanity-gateway-info-host-routing
branch
from
August 12, 2026 17:00
3dcf977 to
5247811
Compare
FamousDirector
approved these changes
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
Contributor
|
🎉 This PR is included in version nvcf-ai-api-gateway-service-v1.32.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Fixes
GET /inforeturning 404 on vanity-gateway when the request carries a Host header matching a configured vanity or OpenAI domain. The hostRouter middleware routes matched-host requests to a per-host sub-router that had no/inforoute, so the handler on the main chi mux was never reached.Additional Details
r.Get("/info", golibversion.Handler().ServeHTTP)to the per-host sub-routers inregisterVanityandregisterOpenAI, matching the pattern already used for/health.GatewayConfig(no hosts registered), so the hostRouter never activated and every request reached the main mux. The fix adds two tests that build the mux with a vanity host and an OpenAI host configured and send requests with matching Host headers.Testing
Confirmed 404 in staging before this fix:
New tests pass:
References
Relates to #315
Summary by CodeRabbit
New Features
/infoendpoint to vanity-domain and OpenAI-specific gateways.Bug Fixes
/inforequests return successful responses with service metadata.