make tests work again

This commit is contained in:
Girish Ramakrishnan
2023-08-14 11:08:38 +05:30
parent 4acbb7136a
commit 4b1b38be63
6 changed files with 10 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ const assert = require('assert'),
dashboard = require('./dashboard.js'),
database = require('./database.js'),
debug = require('debug')('box:oidc'),
dns = require('./dns.js'),
ejs = require('ejs'),
express = require('express'),
eventlog = require('./eventlog.js'),
@@ -791,9 +792,10 @@ async function start() {
}
};
const { fqdn:dashboardFqdn } = await dashboard.getLocation();
debug(`start: create provider for ${dashboardFqdn} at ${ROUTE_PREFIX}`);
const provider = new Provider(`https://${dashboardFqdn}${ROUTE_PREFIX}`, configuration);
const { subdomain, domain } = await dashboard.getLocation();
const fqdn = dns.fqdn(subdomain, domain);
debug(`start: create provider for ${fqdn} at ${ROUTE_PREFIX}`);
const provider = new Provider(`https://${fqdn}${ROUTE_PREFIX}`, configuration);
app.enable('trust proxy');
provider.proxy = true;