EnableCorsAttribute Constructor
Namespace: System.Web.Http.Cors
Assembly: System.Web.Http.Cors (in System.Web.Http.Cors.dll)
Name | Description | |
---|---|---|
![]() |
EnableCorsAttribute(String, String, String) | Initializes a new instance of the EnableCorsAttribute class. |
![]() |
EnableCorsAttribute(String, String, String, String) | Initializes a new instance of the EnableCorsAttribute class. |
EnableCorsAttribute Class
System.Web.Http.Cors Namespace
Return to top
Initializes a new instance of the EnableCorsAttribute class.
public EnableCorsAttribute(
string origins,
string headers,
string methods
)
public:
EnableCorsAttribute(
String^ origins,
String^ headers,
String^ methods
)
new :
origins:string *
headers:string *
methods:string -> EnableCorsAttribute
Public Sub New (
origins As String,
headers As String,
methods As String
)
origins
Type: System.StringComma-separated list of origins that are allowed to access the resource. Use "*" to allow all.
headers
Type: System.StringComma-separated list of headers that are supported by the resource. Use "*" to allow all. Use null or empty string to allow none.
methods
Type: System.StringComma-separated list of methods that are supported by the resource. Use "*" to allow all. Use null or empty string to allow none.
Return to top
Initializes a new instance of the EnableCorsAttribute class.
public EnableCorsAttribute(
string origins,
string headers,
string methods,
string exposedHeaders
)
public:
EnableCorsAttribute(
String^ origins,
String^ headers,
String^ methods,
String^ exposedHeaders
)
new :
origins:string *
headers:string *
methods:string *
exposedHeaders:string -> EnableCorsAttribute
Public Sub New (
origins As String,
headers As String,
methods As String,
exposedHeaders As String
)
origins
Type: System.StringComma-separated list of origins that are allowed to access the resource. Use "*" to allow all.
headers
Type: System.StringComma-separated list of headers that are supported by the resource. Use "*" to allow all. Use null or empty string to allow none.
methods
Type: System.StringComma-separated list of methods that are supported by the resource. Use "*" to allow all. Use null or empty string to allow none.
exposedHeaders
Type: System.StringComma-separated list of headers that the resource might use and can be exposed. Use null or empty string to expose none.
Return to top