Include 'neon-shard-id' header in client requests

This commit is contained in:
Heikki Linnakangas
2025-05-06 15:23:30 +03:00
parent 5f2adaa9ad
commit b7891f8fe8

View File

@@ -286,6 +286,10 @@ impl tonic::service::Interceptor for AuthInterceptor {
fn call(&mut self, mut req: tonic::Request<()>) -> Result<tonic::Request<()>, tonic::Status> {
req.metadata_mut()
.insert("neon-tenant-id", self.tenant_id.clone());
if let Some(shard_id) = &self.shard_id {
req.metadata_mut()
.insert("neon-shard-id", shard_id.clone());
}
req.metadata_mut()
.insert("neon-timeline-id", self.timeline_id.clone());
if let Some(auth_header) = &self.auth_header {