diff --git a/keyserver/src/utils/urls.js b/keyserver/src/utils/urls.js --- a/keyserver/src/utils/urls.js +++ b/keyserver/src/utils/urls.js @@ -21,7 +21,7 @@ export type Site = $Values; const sites: $ReadOnlyArray = values(sitesObj); -const cachedURLFacts = new Map(); +const cachedURLFacts = new Map(); async function fetchURLFacts(site: Site): Promise { const existing = cachedURLFacts.get(site); if (existing !== undefined) { @@ -35,7 +35,7 @@ const { proxy } = urlFacts; urlFacts = { ...urlFacts, - proxy: validProxies.has(proxy) ? proxy : 'apache', + proxy: proxy && validProxies.has(proxy) ? proxy : 'apache', }; } cachedURLFacts.set(site, urlFacts);