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 b68d8b1 commit 0e5af66Copy full SHA for 0e5af66
packages/util/src/url.ts
@@ -20,6 +20,10 @@
20
* @public
21
*/
22
export function isCloudWorkstation(url: string): boolean {
23
+ // `isCloudWorkstation` is called without protocol in certain connect*Emulator functions
24
+ // In HTTP request builders, it's called with the protocol.
25
+ // If called with protocol prefix, it's a valid URL, so we extract the hostname
26
+ // If called without, we assume the string is the hostname.
27
const host =
28
url.startsWith('http://') || url.startsWith('https://')
29
? new URL(url).hostname
0 commit comments