fix ssl check in base URL computation