Skip to content

Commit 54d9a44

Browse files
committed
fix: use https if proxy url is https
Fixes #1180
1 parent 6985639 commit 54d9a44

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/scripts/src/scripts/Server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ export class Server {
281281
* Get URL to network IP where the server is alive.
282282
*/
283283
public getServerUrl(): string {
284-
return `http:${this.webpackConfig.getServerUrl()}`;
284+
const protocol = this.serverConfig.proxy.startsWith('https')
285+
? 'https'
286+
: 'http';
287+
return `${protocol}:${this.webpackConfig.getServerUrl()}`;
285288
}
286289

287290
/**

0 commit comments

Comments
 (0)