Extract route matcher into config