Dela via


CorsPolicyBuilder.SetIsOriginAllowed(Func<String,Boolean>) Method

Definition

Sets the specified isOriginAllowed for the underlying policy.

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

Parameters

isOriginAllowed
Func<String,Boolean>

The function used by the policy to evaluate if an origin is allowed.

Returns

The current policy builder.

Applies to