From f571288cae04b87527387a15f2f2d8f767c72dfa Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Tue, 10 Aug 2021 16:27:57 -0500 Subject: [PATCH] Allow overwriting the marketplace url for our staging environments --- app/apps/server/orchestrator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/apps/server/orchestrator.js b/app/apps/server/orchestrator.js index 50f67ae497c5..335e316dc6c6 100644 --- a/app/apps/server/orchestrator.js +++ b/app/apps/server/orchestrator.js @@ -27,7 +27,11 @@ export class AppServerOrchestrator { this._rocketchatLogger = new Logger('Rocket.Chat Apps'); Permissions.create('manage-apps', ['admin']); - this._marketplaceUrl = 'https://marketplace.rocket.chat'; + if (typeof process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL === 'string' && process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL !== '') { + this._marketplaceUrl = process.env.OVERWRITE_INTERNAL_MARKETPLACE_URL; + } else { + this._marketplaceUrl = 'https://marketplace.rocket.chat'; + } this._model = new AppsModel(); this._logModel = new AppsLogsModel();