Constructor CrossOriginResourceSharingHeaders
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
allowOriginstringThe value of the Access-Control-Allow-Origin header.
allowOriginsstring[]The values of the Access-Control-Allow-Origin header.
allowMethodsstring[]The values of the Access-Control-Allow-Methods header.
allowHeadersstring[]The values of the Access-Control-Allow-Headers header.
exposeHeadersstring[]The values of the Access-Control-Expose-Headers header.
maxAgeTimeSpan?The value of the Access-Control-Max-Age header.
allowCredentialsboolThe value of the Access-Control-Allow-Credentials header.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語