From 2a5ea0269a1f9511c51d661a6c7d7bdc7d0176fa Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 7 Oct 2018 13:20:54 +0200 Subject: Expand HTTP header settings #4 - add doc/Usage/Filter.asciidoc to explain the usage of the filter headers - add HTTP headers to Profile (section "headers") - Use request interceptor to apply filter headers, then profile headers - add insert/delete actions to ProfileEditor --- src/browser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/browser.cpp') diff --git a/src/browser.cpp b/src/browser.cpp index 7bf4adf..7295b56 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -27,6 +27,7 @@ #include #include #include +#include "webengine/filter.h" Browser::Browser(int &argc, char *argv[], bool allowSecondary) : SingleApplication(argc, argv, allowSecondary, SingleApplication::User | SingleApplication::SecondaryNotification | SingleApplication::ExcludeAppVersion) @@ -58,7 +59,8 @@ QPair Browser::loadProfile(const QString &id) { WebProfile *profile = m_profileManager->loadProfile(id); connect(profile, &WebProfile::downloadRequested, m_downloads.get(), &DownloadsWidget::addDownload); - profile->setRequestInterceptor(m_urlFilter.get()); + auto *interceptor = new UrlRequestInterceptor(m_urlFilter.get(), profile, profile); + profile->setRequestInterceptor(interceptor); return QPair(m_profileManager->id(profile), profile); } @@ -107,7 +109,7 @@ void Browser::setup() // downloads m_downloads = std::make_unique(m_config->value("downloads.path").value()); // url request filter - m_urlFilter = std::make_unique(m_config); + m_urlFilter = std::make_unique(m_config); // cookie request filter // load profiles -- cgit v1.2.1