Skip to content
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

Discovery mode revisited #374

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Conversation

garethsb
Copy link
Contributor

@garethsb garethsb commented Feb 19, 2024

POC of replacing discovery_mode setting with sneakily stashing Host header in the web::uri values returned by nmos::details::resolve_service and using this in a web::http::http_pipeline_stage.

Resolves #357

Using the user info in this way is a bit icky. But the other option is to make lots of places that pass web::uri around pass a pair of the URI with the Host header. This way has the side effect of making the values in the settings look something like this whether doing HTTP or HTTPS:

"registration_services": [
  "http://[email protected]:80/x-nmos/registration/v1.3",
  "http://[email protected]:80/x-nmos/registration/v1.3",
  "http://[email protected]:80/x-nmos/registration/v1.3",
  "http://[email protected]:80/x-nmos/registration/v1.3",
  "http://[email protected]:80/x-nmos/registration/v1.3",
  "http://[email protected]:80/x-nmos/registration/v1.3",
  ...
]

If anyone is relying on that property e.g. to populate UI, that would be an unexpected change. :-/

(However, it does also allow the existing registry_address setting to be populated in the same way, and that just works too.)

Copy link
Contributor

@lo-simon lo-simon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lo-simon lo-simon merged commit 62a9165 into sony:master Feb 20, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an HTTP Host header from DNS-SD name resolution for Registration API and System API discovery
2 participants