Method Create
- Namespace
- DisCatSharp.Hosting.AspNetCore.Routing
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
Create(Uri, DiscordAspNetCoreIngressOptions?, DiscordLinkedRolesOptions?)
Creates a public URL snapshot from the supplied base URL and ingress options.
public static DiscordIngressPublicUrls Create(Uri baseUrl, DiscordAspNetCoreIngressOptions? options = null, DiscordLinkedRolesOptions? linkedRolesOptions = null)
Parameters
baseUrlUriThe externally visible base URL for the ASP.NET Core app.
optionsDiscordAspNetCoreIngressOptionsThe ingress route options. Defaults to the package defaults when omitted.
linkedRolesOptionsDiscordLinkedRolesOptionsThe optional linked-roles route options.
Returns
- DiscordIngressPublicUrls
The resolved public ingress URLs.
Remarks
The supplied baseUrl may already contain a path base such as https://example.com/base; the
ingress route prefix and endpoint segments are appended beneath that existing path.
Linked-roles verification URLs deliberately remain outside the ingress route prefix so they can be published independently from the signed interactions and webhook endpoints.
Exceptions
- ArgumentNullException
baseUrlis null.- ArgumentException
baseUrlis not absolute, contains a query or fragment component, or one of the configured route segments is empty after normalization.