Skip to content

Commit 8a53ccb

Browse files
committed
Replace the HostURL-returned value with a https:// URL
1 parent a5c611c commit 8a53ccb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/wp-now/src/config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ async function getAbsoluteURL() {
7777
return getCodeSpaceURL(port);
7878
}
7979
if (isWebContainer()) {
80-
return HostURL.parse('http://localhost:' + port).toString();
80+
return (
81+
HostURL.parse('http://localhost:' + port)
82+
.toString()
83+
// Correct the bug in HostURL.parse – it should return https://
84+
// instead of http://
85+
.replace('http://', 'https://')
86+
);
8187
}
8288

8389
if (absoluteUrlFromBlueprint) {

0 commit comments

Comments
 (0)