You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 line
828 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Configuration;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Http;
  7. using System.Web.Routing;
  8. using Hangfire;
  9. namespace DigitalSchoolApi
  10. {
  11. public class WebApiApplication : System.Web.HttpApplication
  12. {
  13. protected void Application_Start()
  14. {
  15. System.Web.Http.GlobalConfiguration.Configure(WebApiConfig.Register);
  16. Hangfire.GlobalConfiguration.Configuration.UseSqlServerStorage(ConfigurationManager.ConnectionStrings["hangfireString"].ConnectionString);
  17. }
  18. protected void Application_PreSendRequestHeaders(object sender, EventArgs e)
  19. {
  20. if (sender is HttpApplication app)
  21. {
  22. app.Context.Response.Headers.Remove("Server");
  23. }
  24. }
  25. }
  26. }