diff --git a/src/relay.ts b/src/relay.ts index 4060c56..5cd33bd 100644 --- a/src/relay.ts +++ b/src/relay.ts @@ -111,6 +111,13 @@ async function setupSSl() { if (certInfo?.domains.commonName === config.str("domain")) { domainValid = true; } + + if ( + Boolean(isSSlStaging()) !== + Boolean(certInfo?.issuer.commonName.toLowerCase().includes("staging")) + ) { + domainValid = false; + } } if (dateValid && domainValid) {