1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

upgrade to aspnet core 3.1

This commit is contained in:
Kyle Spearrin
2020-01-10 08:33:13 -05:00
parent 8026912eeb
commit 29580684a3
60 changed files with 429 additions and 420 deletions

View File

@ -33,12 +33,17 @@ namespace Bit.Server
{
if(configuration.GetValue<bool?>("serveUnknown") ?? false)
{
app.Map("/alive", HandleMapAlive);
app.UseStaticFiles(new StaticFileOptions
{
ServeUnknownFileTypes = true,
DefaultContentType = "application/octet-stream"
});
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/alive",
async context => await context.Response.WriteAsync(System.DateTime.UtcNow.ToString()));
});
}
else if(configuration.GetValue<bool?>("webVault") ?? false)
{
@ -71,14 +76,14 @@ namespace Bit.Server
}
else
{
app.Map("/alive", HandleMapAlive);
app.UseFileServer();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/alive",
async context => await context.Response.WriteAsync(System.DateTime.UtcNow.ToString()));
});
}
}
private static void HandleMapAlive(IApplicationBuilder app)
{
app.Run(async context => await context.Response.WriteAsync(System.DateTime.UtcNow.ToString()));
}
}
}