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

healthcheck for attachments server

This commit is contained in:
Kyle Spearrin
2019-07-26 20:31:45 -04:00
parent 310e0115d5
commit 0793cb6167
2 changed files with 11 additions and 1 deletions

View File

@ -33,6 +33,7 @@ namespace Bit.Server
{
if(configuration.GetValue<bool?>("serveUnknown") ?? false)
{
app.Map("/alive", HandleMapAlive);
app.UseStaticFiles(new StaticFileOptions
{
ServeUnknownFileTypes = true,
@ -70,8 +71,14 @@ namespace Bit.Server
}
else
{
app.Map("/alive", HandleMapAlive);
app.UseFileServer();
}
}
private static void HandleMapAlive(IApplicationBuilder app)
{
app.Run(async context => await context.Response.WriteAsync(System.DateTime.UtcNow.ToString()));
}
}
}