Best way to use routing rules - Sonatype Nexus Repository - Sonatype Community

Best way to use routing rules

post by roland.asmann on Oct 16, 2025

I’ve been a long time user of Nexus 2 and am very confused about how to setup the routing rules in 3 correctly. The example in the documentation is not really helpful either, as it only shows how not to leak your internal components.

How exactly does ‘allow’ work? If I tell a repo to allow eg ‘/org/sonatype/.*’, will it block all other requests? In other words, would that also block leakage?

post by roland.asmann on Oct 16, 2025

Adding onto this, how (if at all) does the routing affect the order in which repositories are checked for components? Should I rearrange the repositories depending on routing rules?

post by jboss-04 on Oct 16, 2025

The routing is completely reworked. It is easier to understand than in the past, but it uses very different philosophy. You need to apply the routing on each repository manually. Thus you can not have more routings per repository.

And you have two possibilities: block (block everything mentioned in the patterns) or allow (block everything, that is not in the patterns).

If you migrated from NXRM2, your old routings will be ignored (which I did not notice and it caused huge problems to stability of our Nexus).