Partilhar via


ICorsPolicyProvider.GetPolicyAsync(HttpContext, String) Método

Definição

Obtém um CorsPolicy do determinado context

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^> ^ GetPolicyAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ policyName);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy> GetPolicyAsync (Microsoft.AspNetCore.Http.HttpContext context, string policyName);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy?> GetPolicyAsync (Microsoft.AspNetCore.Http.HttpContext context, string? policyName);
abstract member GetPolicyAsync : Microsoft.AspNetCore.Http.HttpContext * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy>
Public Function GetPolicyAsync (context As HttpContext, policyName As String) As Task(Of CorsPolicy)

Parâmetros

context
HttpContext

O HttpContext associado a essa chamada.

policyName
String

Um nome de política opcional a ser buscado.

Retornos

Um CorsPolicy

Aplica-se a