From 262e19b691762eb4fb00c50737c5decd62f35d4a Mon Sep 17 00:00:00 2001 From: David Date: Tue, 14 Jul 2020 13:26:47 +0200 Subject: Add X-Response-Time-ms header and log slow server response time --- MediaBrowser.Model/Configuration/ServerConfiguration.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'MediaBrowser.Model/Configuration/ServerConfiguration.cs') diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index afbe02dd3..56389d524 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -252,6 +252,16 @@ namespace MediaBrowser.Model.Configuration public string[] UninstalledPlugins { get; set; } + /// + /// Gets or sets a value indicating whether slow server responses should be logged as a warning. + /// + public bool EnableSlowResponseWarning { get; set; } + + /// + /// Gets or sets the threshold for the slow response time warning in ms. + /// + public long SlowResponseThresholdMs { get; set; } + /// /// Initializes a new instance of the class. /// @@ -351,6 +361,9 @@ namespace MediaBrowser.Model.Configuration DisabledImageFetchers = new[] { "The Open Movie Database", "TheMovieDb" } } }; + + EnableSlowResponseWarning = true; + SlowResponseThresholdMs = 500; } } -- cgit v1.2.3