mirror of https://github.com/grpc/grpc-node.git
Validate uniqueness of http filter names
This commit is contained in:
parent
ae2cb672b2
commit
f03b4dd87f
|
@ -141,7 +141,12 @@ export class RdsState implements XdsStreamState<RouteConfiguration__Output> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (EXPERIMENTAL_FAULT_INJECTION) {
|
if (EXPERIMENTAL_FAULT_INJECTION) {
|
||||||
for (const filterConfig of Object.values(route.typed_per_filter_config ?? {})) {
|
const filterNames = new Set<string>();
|
||||||
|
for (const [name, filterConfig] of Object.entries(route.typed_per_filter_config ?? {})) {
|
||||||
|
if (filterNames.has(name)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
filterNames.add(name);
|
||||||
if (!validateOverrideFilter(filterConfig)) {
|
if (!validateOverrideFilter(filterConfig)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue