Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nexus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,18 @@ impl Server {
log.new(o!("component" => "dropshot_external_techport")),
)
.config(techport_server_config)
.version_policy(dropshot::VersionPolicy::Dynamic(Box::new(
dropshot::ClientSpecifiesVersionInHeader::new(
omicron_common::api::VERSION_HEADER,
nexus_external_api::latest_version(),
)
// Since we don't have control over all clients to the external
// API, we allow the api-version header to not be specified
// (picking the latest version in that case). However, all
// clients that *are* under our control should specify the
// api-version header.
.on_missing(nexus_external_api::latest_version()),
)))
.tls(tls_config.map(dropshot::ConfigTls::Dynamic))
.start()
.map_err(|error| {
Expand Down
Loading