diff --git a/src/Serilog.Ui.Web/SerilogUiMiddleware.cs b/src/Serilog.Ui.Web/SerilogUiMiddleware.cs index 09708cbf..9486d1e1 100644 --- a/src/Serilog.Ui.Web/SerilogUiMiddleware.cs +++ b/src/Serilog.Ui.Web/SerilogUiMiddleware.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Serilog.Ui.Web.Endpoints; +using System; using System.Reflection; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -63,6 +64,6 @@ private StaticFileMiddleware CreateStaticFileMiddleware( } private bool CheckPath(string currentPath, string OnPath) - => Regex.IsMatch(currentPath, $"^/{Regex.Escape(_options.RoutePrefix)}{OnPath}$", RegexOptions.IgnoreCase); + => Regex.IsMatch(currentPath, $"^/{Regex.Escape(_options.RoutePrefix)}{OnPath}$", RegexOptions.IgnoreCase, TimeSpan.FromSeconds(5)); } } \ No newline at end of file