Dela via


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

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.

Applies to