As far as I know, both “Urls” and “Endpoints” is used to configure endpoints for the ASP.NET Core Kestrel web server.
The urls host configuration key have the limitations.(a default certificate must be available for HTTPS endpoint configuration).
But if you use the Endpoints points, you could have multiple endpoints settings with each own certificate.
Besides, the Url parameter in Endpoints is required for each endpoint. These endpoints replace those defined in the top-level Urls configuration rather than adding to them. Endpoints defined in code via Listen are cumulative with the endpoints defined in the configuration section.
More details, you could refer to this article.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…