handle https prefixes in baseUrl