use bit better place to use UA
This commit is contained in:
parent
d001ca6378
commit
465c0d81e1
@ -101,6 +101,8 @@ Application::Application(const QString& id, int& argc, char** argv)
|
||||
#if defined(USE_WEBENGINE)
|
||||
m_webFactory->urlIinterceptor()->load();
|
||||
|
||||
QWebEngineProfile::defaultProfile()->setHttpUserAgent(QString(HTTP_COMPLETE_USERAGENT));
|
||||
|
||||
connect(QWebEngineProfile::defaultProfile(), &QWebEngineProfile::downloadRequested, this, &Application::downloadRequested);
|
||||
connect(m_webFactory->adBlock(), &AdBlockManager::processTerminated, this, &Application::onAdBlockFailure);
|
||||
|
||||
|
@ -35,9 +35,6 @@ void NetworkUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo& info) {
|
||||
|
||||
// NOTE: Here we can add custom headers for each webengine request, for example "User-Agent".
|
||||
|
||||
info.setHttpHeader(QByteArrayLiteral(HTTP_HEADERS_USER_AGENT),
|
||||
HTTP_COMPLETE_USERAGENT);
|
||||
|
||||
for (UrlInterceptor* interceptor : qAsConst(m_interceptors)) {
|
||||
interceptor->interceptRequest(info);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user