Table of Contents

Class CrossOriginResourceSharingHeaders

Namespace
Sisk.Core.Entity
Assembly
Sisk.Core.dll

Provides a class to provide Cross Origin response headers for when communicating with a browser.

public sealed class CrossOriginResourceSharingHeaders
Inheritance
CrossOriginResourceSharingHeaders
Inherited Members

Constructors

CrossOriginResourceSharingHeaders()

Creates an empty CrossOriginResourceSharingHeaders instance with no predefined CORS headers.

Properties

AllowCredentials

Gets or sets the Access-Control-Allow-Credentials header indicates whether or not the response to the request can be exposed when the credentials flag is true. When used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials.

AllowHeaders

Gets or sets the Access-Control-Allow-Headers header is used in response to a preflight request to indicate which HTTP headers can be used when making the actual request.

AllowMethods

Gets or sets the Access-Control-Allow-Methods header specifies the method or methods allowed when accessing the resource.

AllowOrigin

From MDN: Access-Control-Allow-Origin specifies either a single origin which tells browsers to allow that origin to access the resource; or else — for requests without credentials — the "*" wildcard tells browsers to allow any origin to access the resource.

AllowOrigins

Gets or sets domains which will define the source header according to one of the domains present below.

Empty

Gets an instance of an empty CrossOriginResourceSharingHeaders.

ExposeHeaders

Gets or sets the Access-Control-Expose-Headers header adds the specified headers to the allowlist that JavaScript in browsers is allowed to access.

MaxAge

Gets or sets the Access-Control-Max-Age header indicates how long the results of a preflight request can be cached.

Methods

CreatePublicContext()

Create an instance of Cross-Origin Resource Sharing that allows any origin, any method and any header in the request.