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
object ← CrossOriginResourceSharingHeaders
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
CrossOriginResourceSharingHeaders()
Creates an empty CrossOriginResourceSharingHeaders instance with no predefined CORS headers.
Initializes a new instance of the CrossOriginResourceSharingHeaders class with the specified CORS headers.
Fields
When applied to the AllowOrigin property, the HTTP server automatically applies the incoming request Origin header value to the Access-Control-Allow-Origin header.
When applied to the AllowHeaders property, the HTTP server automatically applies the incoming request headers to the Access-Control-Allow-Origin header.
When applied to the AllowMethods property, the HTTP server automatically applies the incoming request method to the Access-Control-Allow-Origin header.
Properties
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.
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.
Gets or sets the Access-Control-Allow-Methods header specifies the method or methods allowed when accessing the resource.
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.
Gets or sets domains which will define the source header according to one of the domains present below.
Gets an instance of an empty CrossOriginResourceSharingHeaders.
Gets or sets the Access-Control-Expose-Headers header adds the specified headers to the allowlist that JavaScript in browsers is allowed to access.
Gets or sets the Access-Control-Max-Age header indicates how long the results of a preflight request can be cached.
Methods
Create an instance of Cross-Origin Resource Sharing that allows any origin, any method and any header in the request.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語