Move `getIp` to a function of the dispatcher so it can be overriden