|
|
@ -65,8 +65,14 @@ public class MetadataFirstScgFilter implements GlobalFilter, Ordered {
|
|
|
|
metadataContext.putSystemMetadata(
|
|
|
|
metadataContext.putSystemMetadata(
|
|
|
|
MetadataConstant.SystemMetadataKey.PEER_NAMESPACE,
|
|
|
|
MetadataConstant.SystemMetadataKey.PEER_NAMESPACE,
|
|
|
|
MetadataContext.LOCAL_NAMESPACE);
|
|
|
|
MetadataContext.LOCAL_NAMESPACE);
|
|
|
|
metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.PEER_SERVICE,
|
|
|
|
if (route != null) {
|
|
|
|
route.getId());
|
|
|
|
metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.PEER_SERVICE,
|
|
|
|
|
|
|
|
route.getUri().getAuthority());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.PEER_SERVICE,
|
|
|
|
|
|
|
|
exchange.getRequest().getURI().getAuthority());
|
|
|
|
|
|
|
|
}
|
|
|
|
metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.PEER_PATH,
|
|
|
|
metadataContext.putSystemMetadata(MetadataConstant.SystemMetadataKey.PEER_PATH,
|
|
|
|
exchange.getRequest().getURI().getPath());
|
|
|
|
exchange.getRequest().getURI().getPath());
|
|
|
|
|
|
|
|
|
|
|
@ -75,5 +81,4 @@ public class MetadataFirstScgFilter implements GlobalFilter, Ordered {
|
|
|
|
|
|
|
|
|
|
|
|
return chain.filter(exchange);
|
|
|
|
return chain.filter(exchange);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|