From 1919d79e43594f63dbfc826fbb6621dc8744f5a4 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Fri, 16 Dec 2022 15:50:43 +0000 Subject: [PATCH] fix url host parsing --- scripts/generate-env.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate-env.ts b/scripts/generate-env.ts index 401eb024..d1db2ac2 100644 --- a/scripts/generate-env.ts +++ b/scripts/generate-env.ts @@ -37,7 +37,7 @@ const main = async () => { // URLs // If running in a Gitpod environment, auto generated the URLs if (process.env.GITPOD_WORKSPACE_URL) { - const baseUrl = new URL(process.env.GITPOD_WORKSPACE_URL!); + const baseUrl = new URL(process.env.GITPOD_WORKSPACE_URL!).host; envMap['PUBLIC_SERVER_URL'] = `https://3100-${baseUrl}`; envMap['PUBLIC_URL'] = `https://3000-${baseUrl}`;