express icon indicating copy to clipboard operation
express copied to clipboard

Multi-Level Subdomains

Open colinc opened this issue 4 years ago • 0 comments

When attempting to use this component with a custom, multi-level subdomain (for example, api.micro-service.widget.co) the deployment fails with the error "The domain name to be created is not covered by the provided certificate".

It looks like this is coming from: https://github.com/serverless-components/express/blob/77ab7ad185f7f3d76b394b43b6aecce507a1b3dc/src/utils.js#L497

Because it's looking for the "naked domain", and attaching the wildcard on the first level subdomain, the certificate ends up being issued for widget.co with an addition name for *.widget.co, neither of which are valid for api.micro-service.widget.co.

Perhaps I'm misunderstanding and there's a workaround or setup step I'm missing. However, if not, I can provide a pull request.

colinc avatar Oct 26 '20 20:10 colinc