diff --git a/src/reverseproxy.js b/src/reverseproxy.js index 803c0e4e3..1e6b19f3c 100644 --- a/src/reverseproxy.js +++ b/src/reverseproxy.js @@ -314,9 +314,11 @@ async function setupTlsAddon(app) { const certificateDir = `${paths.PLATFORM_DATA_DIR}/tls/${app.id}`; const contents = []; for (const location of getAppLocationsSync(app)) { + if (location.type === apps.LOCATION_TYPE_REDIRECT) continue; + const certificate = await getCertificate(location); - contents.push({ filename: `${location.fqdn}.cert`, data: certificate.cert }); - contents.push({ filename: `${location.fqdn}.key`, data: certificate.key }); + contents.push({ filename: `${location.fqdn.replace('*', '_')}.cert`, data: certificate.cert }); + contents.push({ filename: `${location.fqdn.replace('*', '_')}.key`, data: certificate.key }); if (location.type === apps.LOCATION_TYPE_PRIMARY) { // backward compat contents.push({ filename: 'tls_cert.pem', data: certificate.cert });