Use baseUrl configured in Rails if available, else generate the baseUrl