共用方式為


CorsPolicyBuilder.SetIsOriginAllowed(Func<String,Boolean>) 方法

定義

設定為基礎原則指定的 isOriginAllowed

public:
 Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^ SetIsOriginAllowed(Func<System::String ^, bool> ^ isOriginAllowed);
public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder SetIsOriginAllowed (Func<string,bool> isOriginAllowed);
member this.SetIsOriginAllowed : Func<string, bool> -> Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder
Public Function SetIsOriginAllowed (isOriginAllowed As Func(Of String, Boolean)) As CorsPolicyBuilder

參數

isOriginAllowed
Func<String,Boolean>

原則用來評估是否允許來源的函式。

傳回

目前的原則產生器。

適用於