CorsService.EvaluatePolicy 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.
Overloads
EvaluatePolicy(HttpContext, CorsPolicy) |
Evaluates the given |
EvaluatePolicy(HttpContext, String) |
Looks up a policy using the |
EvaluatePolicy(HttpContext, CorsPolicy)
- Source:
- CorsService.cs
- Source:
- CorsService.cs
- Source:
- CorsService.cs
Evaluates the given policy
using the passed in context
.
public:
virtual Microsoft::AspNetCore::Cors::Infrastructure::CorsResult ^ EvaluatePolicy(Microsoft::AspNetCore::Http::HttpContext ^ context, Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^ policy);
public Microsoft.AspNetCore.Cors.Infrastructure.CorsResult EvaluatePolicy (Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy);
abstract member EvaluatePolicy : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> Microsoft.AspNetCore.Cors.Infrastructure.CorsResult
override this.EvaluatePolicy : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> Microsoft.AspNetCore.Cors.Infrastructure.CorsResult
Public Function EvaluatePolicy (context As HttpContext, policy As CorsPolicy) As CorsResult
Parameters
- context
- HttpContext
The HttpContext associated with the call.
- policy
- CorsPolicy
The CorsPolicy which needs to be evaluated.
Returns
A CorsResult which contains the result of policy evaluation and can be used by the caller to set appropriate response headers.
Implements
Applies to
EvaluatePolicy(HttpContext, String)
- Source:
- CorsService.cs
- Source:
- CorsService.cs
- Source:
- CorsService.cs
Looks up a policy using the policyName
and then evaluates the policy using the passed in
context
.
public:
Microsoft::AspNetCore::Cors::Infrastructure::CorsResult ^ EvaluatePolicy(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ policyName);
public Microsoft.AspNetCore.Cors.Infrastructure.CorsResult EvaluatePolicy (Microsoft.AspNetCore.Http.HttpContext context, string policyName);
member this.EvaluatePolicy : Microsoft.AspNetCore.Http.HttpContext * string -> Microsoft.AspNetCore.Cors.Infrastructure.CorsResult
Public Function EvaluatePolicy (context As HttpContext, policyName As String) As CorsResult
Parameters
- context
- HttpContext
- policyName
- String
Returns
A CorsResult which contains the result of policy evaluation and can be used by the caller to set appropriate response headers.