We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a02c9e commit bb812d7Copy full SHA for bb812d7
packages/data-connect/src/api/DataConnect.ts
@@ -71,13 +71,14 @@ const FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR =
71
* @internal
72
*/
73
export function parseOptions(fullHost: string): TransportOptions {
74
- if (fullHost.startsWith('http://') || fullHost.startsWith('https://')) {
75
- const [protocol, host] = fullHost.split('://');
+ const trimmedHost = fullHost.trim();
+ if (trimmedHost.startsWith('http://') || trimmedHost.startsWith('https://')) {
76
+ const [protocol, host] = trimmedHost.split('://');
77
const isSecure = protocol === 'https';
78
return { host, sslEnabled: isSecure };
79
}
80
return {
- host: fullHost,
81
+ host: trimmedHost,
82
sslEnabled: false
83
};
84
0 commit comments