Dela via


CorsOptions Constructors

Definition

Overloads

CorsOptions()

Initializes a new instance of the CorsOptions class.

CorsOptions(IList<String>, Nullable<Int64>)

Initializes a new instance of the CorsOptions class.

CorsOptions()

Source:
CorsOptions.cs

Initializes a new instance of the CorsOptions class.

public CorsOptions ();
Public Sub New ()

Applies to

CorsOptions(IList<String>, Nullable<Int64>)

Source:
CorsOptions.cs

Initializes a new instance of the CorsOptions class.

public CorsOptions (System.Collections.Generic.IList<string> allowedOrigins, long? maxAgeInSeconds = default);
new Microsoft.Azure.Search.Models.CorsOptions : System.Collections.Generic.IList<string> * Nullable<int64> -> Microsoft.Azure.Search.Models.CorsOptions
Public Sub New (allowedOrigins As IList(Of String), Optional maxAgeInSeconds As Nullable(Of Long) = Nothing)

Parameters

allowedOrigins
IList<String>

The list of origins from which JavaScript code will be granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended).

maxAgeInSeconds
Nullable<Int64>

The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes.

Applies to