Certificate

    It is most common for an SSL certificate to contain only one domain. We can create an ssl object. Here is a simple case, creates a ssl object and route object.

    • cert: PEM-encoded public certificate of the SSL key pair.
    • snis: Hostname(s) to associate with this certificate as SNIs. To set this attribute this certificate must have a valid private key associated with it.

    Sometimes, one SSL certificate may contain a wildcard domain like *.test.com, that means it can accept more than one domain, eg: or mail.test.com.

    If your SSL certificate may contain more than one domain, like www.test.com and mail.test.com, then you can add them into the snis array. For example:

    • certs: PEM-encoded certificate array.

    APISIX will pair certificate and private key with the same indice as a SSL key pair. So the length of certs and keys must be same.