// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { SerializerSettings.Init(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseGraphiQl(); app.UseDeveloperExceptionPage(); app.UseStaticFiles(); //app.UseHttpsRedirection(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Wabbajack Build API"); c.RoutePrefix = string.Empty; }); app.UseRouting(); app.UseJobManager(); app.UseAuthentication(); app.UseAuthorization(); app.UseFileServer(new FileServerOptions { FileProvider = new PhysicalFileProvider( Path.Combine(Directory.GetCurrentDirectory(), "public")) }); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { SerializerSettings.Init(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseGraphiQl(); app.UseDeveloperExceptionPage(); var provider = new FileExtensionContentTypeProvider(); provider.Mappings[".rar"] = "application/x-rar-compressed"; provider.Mappings[".7z"] = "application/x-7z-compressed"; provider.Mappings[".zip"] = "application/zip"; provider.Mappings[".wabbajack"] = "application/zip"; app.UseStaticFiles(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Wabbajack Build API"); c.RoutePrefix = string.Empty; }); app.UseRouting(); app.UseJobManager(); app.UseAuthentication(); app.UseAuthorization(); app.UseFileServer(new FileServerOptions { FileProvider = new PhysicalFileProvider( Path.Combine(Directory.GetCurrentDirectory(), "public")), StaticFileOptions = { ServeUnknownFileTypes = true }, }); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }