I decided to solve this using a filter before the other ones. When the router is initialized I also globally declare it giving the filter access to it. This is definitely a hacky solution but the only one I managed to come up with.