parent
6875ee55d3
commit
8428ec46e1
|
|
@ -14,16 +14,6 @@ namespace Microsoft.AspNet.Mvc.Cors
|
|||
|
||||
public void OnProvidersExecuted(ApplicationModelProviderContext context)
|
||||
{
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
|
|
@ -38,16 +28,6 @@ namespace Microsoft.AspNet.Mvc.Cors
|
|||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
IEnableCorsAttribute enableCors;
|
||||
IDisableCorsAttribute disableCors;
|
||||
|
||||
|
|
|
|||
|
|
@ -56,16 +56,6 @@ namespace Microsoft.AspNet.Mvc.Cors
|
|||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
// If this filter is not closest to the action, it is not applicable.
|
||||
if (!IsClosestToAction(context.Filters))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,16 +41,6 @@ namespace Microsoft.AspNet.Mvc.Cors
|
|||
throw new ArgumentNullException(nameof(serviceProvider));
|
||||
}
|
||||
|
||||
if (serviceProvider == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(serviceProvider));
|
||||
}
|
||||
|
||||
if (serviceProvider == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(serviceProvider));
|
||||
}
|
||||
|
||||
var filter = serviceProvider.GetRequiredService<CorsAuthorizationFilter>();
|
||||
filter.PolicyName = _policyName;
|
||||
return filter;
|
||||
|
|
|
|||
|
|
@ -34,16 +34,6 @@ namespace Microsoft.AspNet.Mvc.Cors
|
|||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
var accessControlRequestMethod =
|
||||
context.HttpContext.Request.Headers[CorsConstants.AccessControlRequestMethod];
|
||||
if (string.Equals(
|
||||
|
|
|
|||
Loading…
Reference in New Issue