简体   繁体   中英

keystone js: localhost is not in the certs altnames

I setup Keystonejs to use the key and chained cert, and it is running ssl just fine as I can log into the cms using google chrome and obtain a secure connection. The issue is that my local hosted api cannot connect to the keystonejs cms api through https.

When I send a request from the local hosted api to the cms that is hosted either locally or on aws, it returns this error:

"reason": "Host: localhost. is not in the cert's altnames: DNS:omitted.com, DNS:www.omitted.com",
  "host": "localhost",
  "cert": {
    "subject": {
      "OU": [
        "Domain Control Validated",
        "PositiveSSL"
      ],
      "CN": "cms.omitted.com"
    },
    "issuer": {
      "C": "GB",
      "ST": "Greater Manchester",
      "L": "Salford",
      "O": "COMODO CA Limited",
      "CN": "COMODO RSA Domain Validation Secure Server CA"
    }, 
...
...

I've tried everything, has anyone ran across this?

I don't believe the certificate would be valid when working locally. You would need a separate HTTPS certificate for your development environment than what you use in your production environment, since they are referring to two different domain names. Take a look at this SO thread , which might help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM