Skip startup message for /system/ping

This commit is contained in:
cvium 2020-09-08 12:37:15 +02:00
parent cd40688584
commit 12bd9ea750

View File

@ -1,8 +1,10 @@
using System;
using System.Net.Mime;
using System.Threading.Tasks;
using MediaBrowser.Controller;
using MediaBrowser.Model.Globalization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
namespace Jellyfin.Server.Middleware
{
@ -34,7 +36,8 @@ namespace Jellyfin.Server.Middleware
IServerApplicationHost serverApplicationHost,
ILocalizationManager localizationManager)
{
if (serverApplicationHost.CoreStartupHasCompleted)
if (serverApplicationHost.CoreStartupHasCompleted
|| httpContext.Request.Path.Equals("/system/ping", StringComparison.OrdinalIgnoreCase))
{
await _next(httpContext).ConfigureAwait(false);
return;