Home > front end >  What HTTP code do you get if an SSL has expired?
What HTTP code do you get if an SSL has expired?

Time:02-10

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:

  •  Tags:  
  • Related