diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 1ce0bfe..71400d6 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -113,6 +113,7 @@ const EdgeAppsBackupPath string = "edgeAppsBackupPath" const WsPath string = "wsPath" const LoggerPath string = "loggerPath" const BrowserDevPasswordFileLocation string = "browserDevPasswordFileLocation" +const BrowserDevProxyPath string = "browserDevProxyPath" // GetPath : Returns either the hardcoded path, or a overwritten value via .env file at project root. Register paths here for seamless working code between dev and prod environments ;) @@ -197,6 +198,13 @@ func GetPath(pathKey string) string { targetPath = "/root/.config/code-server/config.yaml" } + case BrowserDevProxyPath: + if env["BROWSERDEV_PROXY_PATH"] != "" { + targetPath = env["BROWSERDEV_PROXY_PATH"] + } else { + targetPath = "/home/system/components/dev/" + } + default: log.Printf("path_key %s nonexistant in GetPath().\n", pathKey)