diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-07-05 12:13:08 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-07-05 12:13:08 +0200 |
commit | a6bd5a227ecccba76d2486c5a4d6408770e1bcec (patch) | |
tree | a7e754238342651c531d101db9bf745526a230e5 /src/webengine/urlinterceptor.h | |
parent | Update translations (diff) | |
download | smolbote-a6bd5a227ecccba76d2486c5a4d6408770e1bcec.tar.xz |
Add filter.header
Diffstat (limited to 'src/webengine/urlinterceptor.h')
-rw-r--r-- | src/webengine/urlinterceptor.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h index 2a5c50d..2f91e30 100644 --- a/src/webengine/urlinterceptor.h +++ b/src/webengine/urlinterceptor.h @@ -10,7 +10,13 @@ #define URLREQUESTINTERCEPTOR_H #include <QWebEngineUrlRequestInterceptor> +#include <memory> +#include <QVector> +#include <QByteArray> +typedef std::pair<std::string, std::string> Header; + +class Configuration; class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor { Q_OBJECT @@ -19,13 +25,14 @@ public: bool isBlocking; }; - explicit UrlRequestInterceptor(const QString &path, QObject *parent = nullptr); + explicit UrlRequestInterceptor(const std::unique_ptr<Configuration> &config, QObject *parent = nullptr); ~UrlRequestInterceptor() = default; void interceptRequest(QWebEngineUrlRequestInfo &info) override; private: QHash<QString, HostRule> rules; + std::vector<Header> m_headers; }; QHash<QString, UrlRequestInterceptor::HostRule> parse(const QString &filename); |