diff options
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); |