diff --git a/SafeExamBrowser.Browser/Handlers/RequestHandler.cs b/SafeExamBrowser.Browser/Handlers/RequestHandler.cs index 3b6782eb..3e34af3c 100644 --- a/SafeExamBrowser.Browser/Handlers/RequestHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/RequestHandler.cs @@ -150,7 +150,7 @@ namespace SafeExamBrowser.Browser.Handlers { if (quitUrlPattern == default) { - quitUrlPattern = Regex.Escape(settings.QuitUrl.TrimEnd('/')) + @"\/?"; + quitUrlPattern = $"^{Regex.Escape(settings.QuitUrl.TrimEnd('/'))}/?$"; } isQuitUrl = Regex.IsMatch(request.Url, quitUrlPattern, RegexOptions.IgnoreCase);