From b640084920d47aa95e3cd301f64c1b29cc073519 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 22 Jul 2022 21:10:14 -0400 Subject: [PATCH] *Add xor on staging mode and the letsencrypt cert to reprocess if we are live with a staging cert or on staging mode with a live cert. --- src/relay.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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) {