Merge pull request #247 from hashicorp/oss/merge-main-5723d8efb5e4f990ea4aa7eb54f4be11a5e9f6f1

[main] OSS to ENT merge of (5723d8e)
This commit is contained in:
hc-github-team-secure-boundary authored and GitHub committed 2023-05-09 15:23:24 -07:00
commit d8f42098cb
1 file changed
+6 -1
@@ -7,14 +7,19 @@ import fetch from 'fetch';
async function autoInitializeFeatureEdition(owner) {
const service = owner.lookup('service:feature-edition');
const url = '/metadata.json';
const adapter = owner.lookup('adapter:application');
let edition;
let features;
// Attempt to load edition for the metadata JSON
try {
const { host } = adapter;
const path = '/metadata.json';
const url = `${host}${path}`;
const response = await fetch(url);
const json = await response.json();
edition = json?.license?.edition;
features = json?.license?.features;
} catch (e) {