Constructor
CrossOriginResourceSharingHeaders constructor
CrossOriginResourceSharingHeaders() #
Creates an empty CrossOriginResourceSharingHeaders instance with no predefined CORS headers.
public CrossOriginResourceSharingHeaders()CrossOriginResourceSharingHeaders(string?, string[]?, string[]?, string[]?, string[]?, TimeSpan?, bool) #
Initializes a new instance of the CrossOriginResourceSharingHeaders class with the specified CORS headers.
public CrossOriginResourceSharingHeaders(string? allowOrigin = null, string[]? allowOrigins = null, string[]? allowMethods = null, string[]? allowHeaders = null, string[]? exposeHeaders = null, TimeSpan? maxAge = null, bool allowCredentials = false)Parameters #
allowOrigin string?
The value of the Access-Control-Allow-Origin header.
allowOrigins string[]?
The values of the Access-Control-Allow-Origin header.
allowMethods string[]?
The values of the Access-Control-Allow-Methods header.
allowHeaders string[]?
The values of the Access-Control-Allow-Headers header.
exposeHeaders string[]?
The values of the Access-Control-Expose-Headers header.
maxAge TimeSpan?
The value of the Access-Control-Max-Age header.
allowCredentials bool
The value of the Access-Control-Allow-Credentials header.