-
Notifications
You must be signed in to change notification settings - Fork 129
chore(config): disable valid_hosts filter unless explicitly configured #3274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(config): disable valid_hosts filter unless explicitly configured #3274
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Code ReviewSummaryThis PR modifies the Positive Observations ✅
Concerns and Suggestions 🔍1. Security Consideration - Medium PriorityThe change in Current behavior: } else {
// Ignore this behavior if not configured
true
}Concern: In production multi-datacenter environments, if someone accidentally omits Recommendation: This is acceptable given the validation check, but consider adding a comment in the docs/code explaining that single-datacenter setups don't need host validation since there's no routing ambiguity. 2. Test Coverage - High PriorityThe PR doesn't include tests for the new validation logic. Suggested tests: #[test]
fn test_single_datacenter_without_valid_hosts() {
// Should pass validation
}
#[test]
fn test_multi_datacenter_without_valid_hosts() {
// Should fail validation with appropriate error
}
#[test]
fn test_multi_datacenter_with_valid_hosts() {
// Should pass validation
}Location: Consider adding these to 3. Documentation GapThe change in behavior should be documented, particularly:
Where it's used: The 4. Edge Case - Low PriorityIn let valid_hosts = if let Some(hosts) = ¤t_dc.valid_hosts {
hosts.join(", ")
} else {
current_dc.public_url.host_str()...
}However, with the new logic, if Code Quality ✅
Performance Considerations✅ No performance concerns - the validation happens once at config load time. Security ConsiderationsRecommended Actions
Overall AssessmentThe changes are well-structured and solve a legitimate usability issue. The validation logic provides a good safety net. The main gap is test coverage. With tests added, this would be ready to merge. Recommendation: Approve with minor changes (add tests) |
More templates
@rivetkit/actor
@rivetkit/cloudflare-workers
@rivetkit/core
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |

No description provided.