|
20 | 20 | using Autofac; |
21 | 21 | using Autofac.Core; |
22 | 22 | using Autofac.Extensions.DependencyInjection; |
23 | | -using Autofac.Integration.Mvc; |
24 | 23 | using Elmah; |
25 | 24 | using Microsoft.ApplicationInsights.Extensibility; |
26 | 25 | using Microsoft.ApplicationInsights.Extensibility.Implementation; |
|
48 | 47 | using NuGetGallery.Cookies; |
49 | 48 | using NuGetGallery.Diagnostics; |
50 | 49 | using NuGetGallery.Features; |
51 | | -using NuGetGallery.Filters; |
52 | 50 | using NuGetGallery.Frameworks; |
| 51 | +using NuGetGallery.Helpers; |
53 | 52 | using NuGetGallery.Infrastructure; |
54 | 53 | using NuGetGallery.Infrastructure.Authentication; |
55 | 54 | using NuGetGallery.Infrastructure.Lucene; |
@@ -510,8 +509,6 @@ protected override void Load(ContainerBuilder builder) |
510 | 509 |
|
511 | 510 | RegisterCookieComplianceService(configuration, loggerFactory); |
512 | 511 |
|
513 | | - RegisterCustomMvcFilters(builder, configuration); |
514 | | - |
515 | 512 | builder.RegisterType<CookieExpirationService>() |
516 | 513 | .As<ICookieExpirationService>() |
517 | 514 | .SingleInstance(); |
@@ -863,17 +860,6 @@ private static void RegisterFeatureFlagsService(ContainerBuilder builder, Config |
863 | 860 | .SingleInstance(); |
864 | 861 | } |
865 | 862 |
|
866 | | - private static void RegisterCustomMvcFilters(ContainerBuilder builder, ConfigurationService configuration) |
867 | | - { |
868 | | -#pragma warning disable CS4014 // VerifyPackage is not awaited because this is attachment, not execution |
869 | | - builder |
870 | | - .Register(context => new ValidateRecaptchaResponseForUploadsAttribute(context.Resolve<IFeatureFlagService>())) |
871 | | - .AsActionFilterFor<PackagesController>(controller => controller.VerifyPackage(default(VerifyPackageRequest))); |
872 | | -#pragma warning restore CS4014 // VerifyPackage is not awaited because this is attachment, not execution |
873 | | - |
874 | | - builder.RegisterFilterProvider(); |
875 | | - } |
876 | | - |
877 | 863 | private static void RegisterMessagingService(ContainerBuilder builder, ConfigurationService configuration) |
878 | 864 | { |
879 | 865 | if (configuration.Current.AsynchronousEmailServiceEnabled) |
|
0 commit comments