Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions linkerd/app/outbound/src/http/logical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ enum RouterParams<T: Clone + Debug + Eq + Hash> {
}

// Only applies to requests with profiles.
//
// TODO Add l5d-dst-canonical header to requests.
//
// TODO(ver) move this into the endpoint stack so that we can only
// set this on meshed connections.
#[derive(Clone, Debug)]
struct CanonicalDstHeader(NameAddr);

Expand Down
14 changes: 13 additions & 1 deletion linkerd/app/outbound/src/http/logical/profile.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{
super::{concrete, retry},
Concrete, NoRoute,
CanonicalDstHeader, Concrete, NoRoute,
};
use crate::{policy, BackendRef, ParentRef, UNKNOWN_META};
use linkerd_app_core::{
Expand Down Expand Up @@ -313,6 +313,18 @@ impl<T> RouteParams<T> {
.http_profile_route
.to_layer::<classify::Response, _, RouteParams<T>>(),
)
// Add l5d-dst-canonical header to requests.
//
// TODO(ver) move this into the endpoint stack so that we can
// only set this on meshed connections.
.push(
http::NewHeaderFromTarget::<CanonicalDstHeader, _, _>::layer_via(
|rp: &Self| {
let LogicalAddr(addr) = rp.addr.clone();
CanonicalDstHeader(addr)
},
),
)
// Sets the per-route response classifier as a request
// extension.
.push(classify::NewClassify::layer())
Expand Down