Udostępnij za pośrednictwem


DefaultCorsPolicyProvider.GetPolicyAsync(HttpContext, String) Metoda

Definicja

Pobiera element CorsPolicy od danego context

public:
 virtual 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>
override this.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)

Parametry

context
HttpContext

Skojarzone HttpContext z tym wywołaniem.

policyName
String

Opcjonalna nazwa zasad do wyszukania.

Zwraca

Polecenie CorsPolicy

Implementuje

Dotyczy