aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-07-05 19:37:05 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-07-05 19:37:05 +0200
commitaaed4ebc642d95dfb3cddab4fad196e870077bcf (patch)
tree1534dccf6ffd1b6ae3f4d85b13201c0d474c3f78 /src
parentAdd filter.header (diff)
downloadsmolbote-aaed4ebc642d95dfb3cddab4fad196e870077bcf.tar.xz
Add web/urlfilter
Diffstat (limited to 'src')
-rw-r--r--src/webengine/urlinterceptor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp
index 70d7701..4e1b2f1 100644
--- a/src/webengine/urlinterceptor.cpp
+++ b/src/webengine/urlinterceptor.cpp
@@ -47,6 +47,15 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
if(rules.contains(info.requestUrl().host())) {
info.block(rules.value(info.requestUrl().host()).isBlocking);
}
+
+#ifdef QT_DEBUG
+ qDebug("request>>>");
+ qDebug("firstParty url=%s", qUtf8Printable(info.firstPartyUrl().toString()));
+ qDebug("firstParty host=%s", qUtf8Printable(info.firstPartyUrl().host()));
+ qDebug("request url=%s", qUtf8Printable(info.requestUrl().toString()));
+ qDebug("request host=%s", qUtf8Printable(info.requestUrl().host()));
+ qDebug("<<<");
+#endif
}
QHash<QString, UrlRequestInterceptor::HostRule> parse(const QString &filename)