Class CORS_PolicyAttribute
Declare a CORS policy.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = true)]
public class CORS_PolicyAttribute : Attribute
- Inheritance
-
objectAttributeCORS_PolicyAttribute
Remarks
You must use with [EnableCORS(..)] to enable the policy
Constructors
CORS_PolicyAttribute(string)
public CORS_PolicyAttribute(string PolicyName)
Parameters
PolicyName
string
CORS_PolicyAttribute(string, params string[])
public CORS_PolicyAttribute(string PolicyName, params string[] Origins)
Parameters
Fields
Credentials
public bool? Credentials
Field Value
- bool?
ExposedHeaders
public string[]? ExposedHeaders
Field Value
- string[]
Headers
public string[]? Headers
Field Value
- string[]
MaxAge
public TimeSpan? MaxAge
Field Value
Methods
public Methods? Methods
Field Value
Origins
public string[]? Origins
Field Value
- string[]
PolicyName
public string? PolicyName