CorsPolicyBuilder.SetIsOriginAllowed(Func<String,Boolean>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The function used by the policy to evaluate if an origin is allowed.
Returns
The current policy builder.