mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-26 15:43:49 +03:00
feat(browser): log blocked requests
This commit is contained in:
parent
3ee3b9a5c4
commit
0c47b3bbb1
@ -27,8 +27,12 @@
|
||||
#include <core/networkaccessmanager.h>
|
||||
#include <core/settings.h>
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
using namespace Zeal::Browser;
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "zeal.browser.urlrequestinterceptor")
|
||||
|
||||
UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent)
|
||||
: QWebEngineUrlRequestInterceptor(parent)
|
||||
{
|
||||
@ -77,5 +81,6 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
|
||||
|
||||
void UrlRequestInterceptor::blockRequest(QWebEngineUrlRequestInfo &info)
|
||||
{
|
||||
qCDebug(log, "Blocked request: %s '%s'.", info.requestMethod().data(), qPrintable(info.requestUrl().toString()));
|
||||
info.block(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user