Accept upstreamUri as string for proxy app install

This commit is contained in:
Johannes Zellner
2022-06-09 14:21:09 +02:00
parent 923a9f6560
commit 11d7dfa071
3 changed files with 18 additions and 3 deletions

View File

@@ -510,6 +510,10 @@ async function writeAppNginxConfig(app, fqdn, type, bundle) {
if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) {
data.endpoint = 'external';
// prevent generating invalid nginx configs
if (!app.upstreamUri) throw new BoxError(BoxError.BAD_FIELD, 'upstreamUri cannot be empty');
data.upstreamUri = app.upstreamUri;
}