handle https for foreman