Skip to content

Commit fb5e9cb

Browse files
author
Clément TURMEL
authored
Merge pull request #2558 from input-output-hk/ctl/2494-allow-new-header-client-type
Allow new header client type
2 parents 869d017 + 5dd5637 commit fb5e9cb

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.7.57"
3+
version = "0.7.58"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/http_server/routes/router.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ use crate::ServeCommandDependenciesContainer;
88

99
use mithril_common::api_version::APIVersionProvider;
1010
use mithril_common::entities::SignedEntityTypeDiscriminants;
11-
use mithril_common::{CardanoNetwork, MITHRIL_API_VERSION_HEADER, MITHRIL_ORIGIN_TAG_HEADER};
11+
use mithril_common::{
12+
CardanoNetwork, MITHRIL_API_VERSION_HEADER, MITHRIL_CLIENT_TYPE_HEADER,
13+
MITHRIL_ORIGIN_TAG_HEADER,
14+
};
1215

1316
use slog::{warn, Logger};
1417
use std::collections::{BTreeSet, HashSet};
@@ -123,6 +126,7 @@ pub fn routes(
123126
"content-type",
124127
MITHRIL_API_VERSION_HEADER,
125128
MITHRIL_ORIGIN_TAG_HEADER,
129+
MITHRIL_CLIENT_TYPE_HEADER,
126130
])
127131
.allow_methods(vec![Method::GET, Method::POST, Method::OPTIONS]);
128132

@@ -218,7 +222,7 @@ mod tests {
218222
use mithril_common::{
219223
entities::Epoch,
220224
era::{EraChecker, SupportedEra},
221-
MITHRIL_ORIGIN_TAG_HEADER,
225+
MITHRIL_CLIENT_TYPE_HEADER, MITHRIL_ORIGIN_TAG_HEADER,
222226
};
223227

224228
use crate::initialize_dependencies;
@@ -339,7 +343,7 @@ mod tests {
339343
);
340344

341345
assert!(request_with_access_control_request_headers(format!(
342-
"{MITHRIL_API_VERSION_HEADER},{MITHRIL_ORIGIN_TAG_HEADER}"
346+
"{MITHRIL_API_VERSION_HEADER},{MITHRIL_ORIGIN_TAG_HEADER},{MITHRIL_CLIENT_TYPE_HEADER}"
343347
))
344348
.reply(&routes)
345349
.await

0 commit comments

Comments
 (0)