Require apex and www TLS for storefront SSL status.

Per-row ensure and SSL refresh treat storefront as valid only when both names match, and toast messages list each host explicitly.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-09 17:57:24 +03:30
co-authored by Cursor
parent a9d5f2e48d
commit 158523df7b
3 changed files with 86 additions and 34 deletions
+4 -3
View File
@@ -1,14 +1,15 @@
import * as tls from 'tls';
const DEFAULT_TIMEOUT_MS = 2500;
const DEFAULT_TIMEOUT_MS = 4000;
function peerMatchesHost(host: string, socket: tls.TLSSocket): boolean {
const cert = socket.getPeerCertificate();
// detailed=true so SAN is present for checkServerIdentity
const cert = socket.getPeerCertificate(true);
if (!cert || Object.keys(cert).length === 0) {
return false;
}
try {
const err = tls.checkServerIdentity(host, cert);
const err = tls.checkServerIdentity(host, cert as tls.PeerCertificate);
return !err;
} catch {
return false;