core: added option to force the protocol of user facing urls.
This is useful when a proxy translates between https and http.