Ver Fonte

Skip startup message for /system/ping

cvium há 4 anos atrás
pai
commit
12bd9ea750

+ 4 - 1
Jellyfin.Server/Middleware/ServerStartupMessageMiddleware.cs

@@ -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;