Table of Contents

Method Restricting

Namespace
MailFathom.Infrastructure.Security.Transport
Assembly
MailFathom.Infrastructure.dll

Restricting(IEnumerable<string>)

Creates a policy that serves an exact set of origins.

public static McpOriginPolicy Restricting(IEnumerable<string> allowedOrigins)

Parameters

allowedOrigins IEnumerable<string>

The configured origins, which must already have passed TryNormalize(string?, out string).

Returns

McpOriginPolicy

The restricting policy.

Exceptions

ArgumentNullException

Thrown when allowedOrigins is null.

ArgumentException

Thrown when allowedOrigins is empty; serving no browser at all is ServingNoBrowserOrigin, which says so by its name rather than by a list that happens to be short.