Skip to content

Commit

Permalink
fix: use https if proxy url is https
Browse files Browse the repository at this point in the history
Fixes #1180
  • Loading branch information
swashata committed May 2, 2021
1 parent 6985639 commit 54d9a44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/scripts/src/scripts/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ export class Server {
* Get URL to network IP where the server is alive.
*/
public getServerUrl(): string {
return `http:${this.webpackConfig.getServerUrl()}`;
const protocol = this.serverConfig.proxy.startsWith('https')
? 'https'
: 'http';
return `${protocol}:${this.webpackConfig.getServerUrl()}`;
}

/**
Expand Down

0 comments on commit 54d9a44

Please sign in to comment.