Explorar o código

move metrics to end of pipeline

crobibero %!s(int64=4) %!d(string=hai) anos
pai
achega
ca6dfd7c45
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  1. 6 5
      Jellyfin.Server/Startup.cs

+ 6 - 5
Jellyfin.Server/Startup.cs

@@ -139,17 +139,18 @@ namespace Jellyfin.Server
                 mainApp.UseJellyfinApiSwagger(_serverConfigurationManager);
                 mainApp.UseRouting();
                 mainApp.UseAuthorization();
-                if (_serverConfigurationManager.Configuration.EnableMetrics)
-                {
-                    // Must be registered after any middleware that could change HTTP response codes or the data will be bad
-                    mainApp.UseHttpMetrics();
-                }
 
                 mainApp.UseLanFiltering();
                 mainApp.UseIpBasedAccessValidation();
                 mainApp.UseWebSocketHandler();
                 mainApp.UseServerStartupMessage();
 
+                if (_serverConfigurationManager.Configuration.EnableMetrics)
+                {
+                    // Must be registered after any middleware that could change HTTP response codes or the data will be bad
+                    mainApp.UseHttpMetrics();
+                }
+
                 mainApp.UseEndpoints(endpoints =>
                 {
                     endpoints.MapControllers();