ICorsService.EvaluatePolicy(HttpContext, CorsPolicy) 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.
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.