void OnApplicationStartCompleted(object sender, EventArgs e) { // ADNSF Supports its own content security policy filter and requires built in support to be shutoff. // If a merchant shuts off csp, we need mvc anti-forgery mechanisms to be disabled. AntiForgeryConfig.SuppressXFrameOptionsHeader = true; GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleTable.EnableOptimizations = StringComparer.OrdinalIgnoreCase.Equals( ConfigurationManager.AppSettings["EnableBundlingAndMinification"], bool.TrueString); DependencyConfig.RegisterDependencies(); StringResourceConfig.Configure(); ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new SkinAwareViewEngine()); ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; //This prevents the data-val-required attribute from being added to non-nullable form elements that aren't actually flagged as required. //Having that attribute on fields incorrectly throws off screen readers. DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false; }
void OnApplicationStartCompleted(object sender, EventArgs e) { // ADNSF Supports its own content security policy filter and requires built in support to be shutoff. // If a merchant shuts off csp, we need mvc anti-forgery mechanisms to be disabled. AntiForgeryConfig.SuppressXFrameOptionsHeader = true; GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleTable.EnableOptimizations = StringComparer.OrdinalIgnoreCase.Equals( ConfigurationManager.AppSettings["EnableBundlingAndMinification"], bool.TrueString); StringResourceConfig.Configure(); DependencyConfig.RegisterDependencies(); ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new SkinAwareViewEngine()); ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; }