diff --git a/internal/configs/virtualserver.go b/internal/configs/virtualserver.go index f239de3382..8f98aa4c56 100644 --- a/internal/configs/virtualserver.go +++ b/internal/configs/virtualserver.go @@ -327,7 +327,7 @@ func (vsc *virtualServerConfigurator) GenerateVirtualServerConfig(virtualServerE locSnippets := r.LocationSnippets // use referenced VirtualServer location snippet if the route does not define any if r.LocationSnippets == "" { - locSnippets = vsrLocationSnippetsFromVs[r.Route] + locSnippets = vsrLocationSnippetsFromVs[vsrNamespaceName] } if len(r.Matches) > 0 {