Fixes #8290 - dry up foreman_url logic in one place