共用方式為


CorsPolicyBuilder 建構函式

定義

多載

CorsPolicyBuilder(CorsPolicy)

建立 CorsPolicyBuilder 的新執行個體。

CorsPolicyBuilder(String[])

建立 CorsPolicyBuilder 的新執行個體。

CorsPolicyBuilder(CorsPolicy)

來源:
CorsPolicyBuilder.cs
來源:
CorsPolicyBuilder.cs
來源:
CorsPolicyBuilder.cs

建立 CorsPolicyBuilder 的新執行個體。

public:
 CorsPolicyBuilder(Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^ policy);
public CorsPolicyBuilder (Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder : Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder
Public Sub New (policy As CorsPolicy)

參數

policy
CorsPolicy

將用來初始化產生器的原則。

適用於

CorsPolicyBuilder(String[])

來源:
CorsPolicyBuilder.cs
來源:
CorsPolicyBuilder.cs
來源:
CorsPolicyBuilder.cs

建立 CorsPolicyBuilder 的新執行個體。

public:
 CorsPolicyBuilder(... cli::array <System::String ^> ^ origins);
public CorsPolicyBuilder (params string[] origins);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder : string[] -> Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder
Public Sub New (ParamArray origins As String())

參數

origins
String[]

可新增的來源清單。

備註

WithOrigins(String[]) 如需正規化原點值的詳細資料。

適用於