Modify the 'before' path in controllerFactory