Dela via


CorsService Class

Definition

Default implementation of ICorsService.

public ref class CorsService : Microsoft::AspNetCore::Cors::Infrastructure::ICorsService
public class CorsService : Microsoft.AspNetCore.Cors.Infrastructure.ICorsService
type CorsService = class
    interface ICorsService
Public Class CorsService
Implements ICorsService
Inheritance
CorsService
Implements

Constructors

CorsService(IOptions<CorsOptions>, ILoggerFactory)

Creates a new instance of the CorsService.

CorsService(IOptions<CorsOptions>)
Obsolete.

Creates a new instance of the CorsService.

Methods

ApplyResult(CorsResult, HttpResponse)

Adds CORS-specific response headers to the given response.

EvaluatePolicy(HttpContext, CorsPolicy)

Evaluates the given policy using the passed in context.

EvaluatePolicy(HttpContext, String)

Looks up a policy using the policyName and then evaluates the policy using the passed in context.

EvaluatePreflightRequest(HttpContext, CorsPolicy, CorsResult)

Evaluate a preflight request using the specified policy. The result is set on the specified CorsResult instance.

EvaluateRequest(HttpContext, CorsPolicy, CorsResult)

Evaluate a request using the specified policy. The result is set on the specified CorsResult instance.

Applies to