Move every SSF transmitter route onto SsfEndpointOptions - #335
Merged
Conversation
Route strings scattered across mapping calls made a gateway topology a puzzle assembled at three call sites; now one options object states the whole of it. ManagementPrefix (default /ssf) is where the surface is mapped, AdvertisedPrefix is what the configuration document names when a rewriting proxy makes the two differ, ConfigurationDocumentRoute is the internal route the proxy maps the canonical address onto, and the MapWellKnownConfiguration flag moved beside them. Both mapping calls lost their path parameters: MapSsfTransmitterEndpoints() and MapSsfConfigurationDocument() read the options, and the canonical well-known address remains derived from the issuer, never from configuration.
The platform's own idiom for path-valued options, as the authentication middleware options already model their paths. Construction rejects a value missing its leading slash, so a typo fails loudly at startup instead of mapping a dead route, and an unset prefix or route is the struct's own no-value state rather than a null string. Host code does not change - string literals convert implicitly.
|
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.



Route strings scattered across mapping calls made a gateway topology a puzzle assembled at three call sites; one options object now states the whole of it: ManagementPrefix (default /ssf), AdvertisedPrefix for what the configuration document names behind a rewriting proxy, ConfigurationDocumentRoute for the internal route the proxy maps the canonical address onto, and the MapWellKnownConfiguration suppression flag beside them. MapSsfTransmitterEndpoints() and MapSsfConfigurationDocument() lost their path parameters and read the options; the canonical well-known address remains derived from the issuer, never from configuration. The end-to-end gateway scenario now declares its whole topology in the one options object.