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:
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user