1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 07:43:54 +00:00

Initial cleanup

This commit is contained in:
Hinton
2025-10-16 15:17:44 -07:00
parent 58c620e8a0
commit b9dcac4423
4 changed files with 10 additions and 18 deletions

View File

@@ -4,13 +4,8 @@ using Bit.SharedWeb.Utilities;
var builder = WebApplication.CreateBuilder(args);
// Generate a new MangleId for a request
builder.Services.AddScoped<MangleId>(_ => new MangleId());
// Add services to the container.
builder.Services.AddControllers();
// Configure GlobalSettings from appsettings
var globalSettings = builder.Services.AddGlobalSettingsServices(builder.Configuration, builder.Environment);
// Common services
@@ -24,6 +19,7 @@ builder.Services.AddScoped<Microsoft.AspNetCore.Identity.IPasswordHasher<Bit.Cor
builder.Services.AddSingleton<Bit.RustSDK.RustSdkService>();
builder.Services.AddScoped<Bit.Seeder.Factories.UserSeeder>();
builder.Services.AddScoped<IRecipeService, RecipeService>();
builder.Services.AddScoped<MangleId>(_ => new MangleId());
var app = builder.Build();
@@ -31,18 +27,10 @@ var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseRouting();
app.MapControllerRoute(
name: "seed",
pattern: "{controller=Seed}/{action=Index}/{id?}");
app.MapControllerRoute(
name: "info",
pattern: "{controller=Info}/{action=Index}/{id?}");
app.MapControllerRoute(name: "default", pattern: "{controller=Seed}/{action=Index}/{id?}");
app.Run();