Skip to content

CorsSettings Class

Represents the settings for Cross-Origin Resource Sharing (CORS) policy. CORS policies allow web applications to make requests from different domains, enhancing security by restricting cross-origin requests.

C#
public record CorsSettings : System.IEquatable<Abblix.Oidc.Server.Mvc.Configuration.CorsSettings>

Inheritance System.Object → CorsSettings

Implements System.IEquatable<CorsSettings>

Properties

CorsSettings.AllowCredentials Property

Indicates whether the resource supports credentials like cookies, authorization headers, or TLS client certificates.

C#
public System.Nullable<bool> AllowCredentials { get; init; }

Property Value

System.Nullable<System.Boolean>

CorsSettings.AllowedHeaders Property

Defines which HTTP headers can be used when making the actual request to the resource.

C#
public string[]? AllowedHeaders { get; init; }

Property Value

System.String[]

CorsSettings.AllowedMethods Property

Specifies which HTTP methods are permitted when accessing the resource from the allowed origins.

C#
public string[]? AllowedMethods { get; init; }

Property Value

System.String[]

CorsSettings.AllowedOrigins Property

A list of origins that are allowed to make requests to the resource, enhancing security by limiting cross-origin interactions.

C#
public string[]? AllowedOrigins { get; init; }

Property Value

System.String[]

CorsSettings.ExposeHeaders Property

Specifies which headers can be exposed as part of the response by listing them.

C#
public string[]? ExposeHeaders { get; init; }

Property Value

System.String[]

CorsSettings.MaxAge Property

Defines the maximum duration the information provided by the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers can be cached.

C#
public System.Nullable<System.TimeSpan> MaxAge { get; init; }

Property Value

System.Nullable<System.TimeSpan>