SEBWIN-458: Fixed issue with rendering of PDFs when request filtering is enabled.

This commit is contained in:
Damian Büchel 2021-02-08 18:10:20 +01:00
parent cb84fbd689
commit 3b7410b83d

View file

@ -124,7 +124,8 @@ namespace SafeExamBrowser.Browser.Handlers
{ {
var result = filter.Process(new Request { Url = request.Url }); var result = filter.Process(new Request { Url = request.Url });
if (result == FilterResult.Block) // We apparently can't filter chrome extension requests, as this prevents the rendering of PDFs.
if (result == FilterResult.Block && !request.Url.StartsWith("chrome-extension://"))
{ {
block = true; block = true;
logger.Info($"Blocked main request{(windowSettings.UrlPolicy.CanLog() ? $" for '{request.Url}'" : "")} ({request.ResourceType}, {request.TransitionType})."); logger.Info($"Blocked main request{(windowSettings.UrlPolicy.CanLog() ? $" for '{request.Url}'" : "")} ({request.ResourceType}, {request.TransitionType}).");