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>

策略用于评估是否允许源的函数。

返回

当前策略生成器。

适用于