AdvantageCMS.Core.Common.BaseClasses Namespace
Advantage CSP

AdvantageApiCorsPolicyAttribute..::..GetCorsPolicyAsync Method

Asynchronously gets the CORS policy for the current request.

Namespace:  AdvantageCSP.API
Assembly:  AdvantageCSP.API (in AdvantageCSP.API.dll)

Syntax


public Task<CorsPolicy> GetCorsPolicyAsync(
	HttpRequestMessage request,
	CancellationToken cancellationToken
)

Parameters

request
Type: HttpRequestMessage
The HTTP request for which to retrieve the CORS policy.
cancellationToken
Type: CancellationToken
A token to cancel the operation.

Return Value

A task that represents the asynchronous operation, containing the CORS policy.