EnableCorsAttribute Class¶
- Namespace
Microsoft.AspNetCore.Cors- Assemblies
- Microsoft.AspNetCore.Cors
Inheritance Hierarchy¶
System.ObjectSystem.AttributeMicrosoft.AspNetCore.Cors.EnableCorsAttribute
Syntax¶
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class EnableCorsAttribute : Attribute, _Attribute, IEnableCorsAttribute
-
class
Microsoft.AspNetCore.Cors.EnableCorsAttribute
Constructors¶
-
EnableCorsAttribute(System.String)¶ Creates a new instance of the
Microsoft.AspNetCore.Cors.EnableCorsAttribute.Arguments: policyName (System.String) – The name of the policy to be applied. public EnableCorsAttribute(string policyName)
-
Properties¶
-
Microsoft.AspNetCore.Cors.EnableCorsAttribute.PolicyName¶ Return type: System.String public string PolicyName { get; set; }
-