proxy/mucp: use Micro-Namespace to filter networks (#1772)

This commit is contained in:
ben-toogood 2020-07-01 10:55:46 +01:00 committed by GitHub
parent a64078b5c3
commit 979af853b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ func (p *Proxy) filterRoutes(ctx context.Context, routes []router.Route) []route
} }
// only process routes with this network // only process routes with this network
if net, ok := md.Get("Micro-Network"); ok && len(net) > 0 { if net, ok := md.Get("Micro-Namespace"); ok && len(net) > 0 {
if route.Network != router.DefaultNetwork && route.Network != net { if route.Network != router.DefaultNetwork && route.Network != net {
// skip routes that don't mwatch // skip routes that don't mwatch
continue continue