diff options
| author | Patrick Barron <18354464+barronpm@users.noreply.github.com> | 2020-07-15 22:50:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-15 22:50:05 +0000 |
| commit | 352dab701866b37d0dd5dcaa6343ccc256d7e837 (patch) | |
| tree | f6131efe207859e1423892c4f96dc25948af845e /MediaBrowser.Model/Configuration/ServerConfiguration.cs | |
| parent | 9ed9bbb7a0ea7ae42d96ae1d67cd181043456948 (diff) | |
| parent | 262e19b691762eb4fb00c50737c5decd62f35d4a (diff) | |
Merge pull request #3556 from Ullmie02/api-slow
Add X-Response-Time-ms header and log slow server response time (Jellyfin.Api)
Diffstat (limited to 'MediaBrowser.Model/Configuration/ServerConfiguration.cs')
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ -253,6 +253,16 @@ namespace MediaBrowser.Model.Configuration public string[] UninstalledPlugins { get; set; } /// <summary> + /// Gets or sets a value indicating whether slow server responses should be logged as a warning. + /// </summary> + public bool EnableSlowResponseWarning { get; set; } + + /// <summary> + /// Gets or sets the threshold for the slow response time warning in ms. + /// </summary> + public long SlowResponseThresholdMs { get; set; } + + /// <summary> /// Initializes a new instance of the <see cref="ServerConfiguration" /> class. /// </summary> public ServerConfiguration() @@ -351,6 +361,9 @@ namespace MediaBrowser.Model.Configuration DisabledImageFetchers = new[] { "The Open Movie Database", "TheMovieDb" } } }; + + EnableSlowResponseWarning = true; + SlowResponseThresholdMs = 500; } } |
