I have a custom monitor code setup. I need to check if the specified URL has its SSL certificate expired. Is there a specific HTTP code for this? For example:
(async() => {
const res = await fetch('http://example.com');
// Or `statusText`
if (res.status == some_ssl_expiryCode) {
console.log('SSL expired!');
}
})();
Is there a way to do this in javascript?
Thank you.
CodePudding user response: