Skip startup message for /system/ping

pull/4102/head
cvium 4 years ago
parent cd40688584
commit 12bd9ea750

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

Loading…
Cancel
Save