ICorsService.EvaluatePolicy(HttpContext, CorsPolicy) ICorsService.EvaluatePolicy(HttpContext, CorsPolicy) ICorsService.EvaluatePolicy(HttpContext, CorsPolicy) ICorsService.EvaluatePolicy(HttpContext, CorsPolicy) Method

Definition

Evaluates the given policy using the passed in context.

public:
 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
Public Function EvaluatePolicy (context As HttpContext, policy As CorsPolicy) As CorsResult

Parameters

context
HttpContext HttpContext HttpContext HttpContext

The HttpContext associated with the call.

policy
CorsPolicy CorsPolicy CorsPolicy 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.

Applies to