Commit 229a289c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Exclude redirect too

parent 02646179
...@@ -39,8 +39,10 @@ bool BlockExternalResourcesUrlInterceptor::interceptRequest(QWebEngineUrlRequest ...@@ -39,8 +39,10 @@ bool BlockExternalResourcesUrlInterceptor::interceptRequest(QWebEngineUrlRequest
|| scheme == QLatin1String("file")) { || scheme == QLatin1String("file")) {
return false; return false;
} }
const QWebEngineUrlRequestInfo::ResourceType resourceType = info.resourceType(); const QWebEngineUrlRequestInfo::ResourceType resourceType = info.resourceType();
const QWebEngineUrlRequestInfo::NavigationType navigationType = info.navigationType(); const QWebEngineUrlRequestInfo::NavigationType navigationType = info.navigationType();
if (resourceType == QWebEngineUrlRequestInfo::ResourceTypeMedia if (resourceType == QWebEngineUrlRequestInfo::ResourceTypeMedia
|| resourceType == QWebEngineUrlRequestInfo::ResourceTypePing || resourceType == QWebEngineUrlRequestInfo::ResourceTypePing
|| resourceType == QWebEngineUrlRequestInfo::ResourceTypePrefetch || resourceType == QWebEngineUrlRequestInfo::ResourceTypePrefetch
...@@ -62,7 +64,8 @@ bool BlockExternalResourcesUrlInterceptor::interceptRequest(QWebEngineUrlRequest ...@@ -62,7 +64,8 @@ bool BlockExternalResourcesUrlInterceptor::interceptRequest(QWebEngineUrlRequest
} else if (navigationType == QWebEngineUrlRequestInfo::NavigationTypeReload } else if (navigationType == QWebEngineUrlRequestInfo::NavigationTypeReload
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeTyped || navigationType == QWebEngineUrlRequestInfo::NavigationTypeTyped
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeBackForward || navigationType == QWebEngineUrlRequestInfo::NavigationTypeBackForward
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeOther) { || navigationType == QWebEngineUrlRequestInfo::NavigationTypeOther
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeRedirect) {
return true; return true;
} }
return false; return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment