Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the RPC HTTP-configuration change.
No open issues 🎉
What changed in this PR
This PR aligns RPC’s HTTP configuration with Horizon and Federation, allowing contract workflows to inherit Config.allowHttp when no per-instance option is supplied. It addresses the shared server-guard portion of #1731 without changing authority validation.
Changes:
- Consolidates the three server guards into
assertSecureUrl, preserving explicitfalseoverrides, rejection ofnull, and server-specific error messages. - Adds helper, RPC, and contract-client regression tests; corrects Federation’s global-flag test.
- Documents the global fallback and updates reference documentation and the changelog.
| File | Description |
|---|---|
test/unit/utils/url.test.ts |
Tests shared-guard defaults, overrides, and null handling. |
test/unit/server/soroban/constructor.test.ts |
Tests RPC global fallback and explicit refusal. |
test/unit/federation_server.test.ts |
Removes the explicit option from the global-flag test. |
test/unit/contract/client_allow_http.test.ts |
Tests contract-client HTTP rejection and global fallback. |
src/utils/url.ts |
Adds the shared assertSecureUrl guard. |
src/rpc/server.ts |
Uses the shared guard and documents global configuration. |
src/horizon/server.ts |
Replaces the duplicated guard with the shared helper. |
src/federation/server.ts |
Replaces the duplicated guard with the shared helper. |
src/contract/types.ts |
Documents global fallback for client options. |
docs/reference/seps-federation.md |
Refreshes source-line links. |
docs/reference/network-rpc.md |
Documents global configuration and refreshes source links. |
docs/reference/network-horizon.md |
Refreshes source-line links. |
docs/reference/contracts-client.md |
Refreshes source-line links. |
CHANGELOG.md |
Records the RPC and contract-workflow behavior fix. |
Review effort: Balanced
Ryang-21
approved these changes
Nov 24, 2026
This branch has not been deployed
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.
rpc.ServerignoringConfig.setAllowHttp()—contract.ClientandAssembledTransactionwithoutallowHttprefusedhttp:even with the global flag on, while Horizon and Federation honored itHorizon.Server,rpc.ServerandFederation.Serverwith one internalassertSecureUrlhelper, so the servers can't drift apart againallowHttp: falsewinning over the global flag, and keptnullrefused (onlyundefinedfalls back, as before)allowHttp: trueand so never tested the fallbackCloses #1731