Commit b1eab831 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix QNetworkAccessManager usage

parent 14cabc16
......@@ -30,6 +30,9 @@ ShortUrlEngineInterface::ShortUrlEngineInterface(ShortUrlEnginePlugin *plugin, Q
, mNetworkAccessManager(new QNetworkAccessManager(this))
, mEnginePlugin(plugin)
{
mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
mNetworkAccessManager->enableStrictTransportSecurityStore(true);
}
ShortUrlEngineInterface::~ShortUrlEngineInterface()
......
......@@ -29,6 +29,9 @@ LanguageToolManager::LanguageToolManager(QObject *parent)
: QObject(parent)
, mNetworkAccessManager(new QNetworkAccessManager(this))
{
mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
mNetworkAccessManager->enableStrictTransportSecurityStore(true);
loadSettings();
}
......
......@@ -37,6 +37,9 @@ LanguageToolWidget::LanguageToolWidget(QWidget *parent)
: QWidget(parent)
, mNetworkAccessManager(new QNetworkAccessManager(this))
{
mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
mNetworkAccessManager->enableStrictTransportSecurityStore(true);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QPushButton *button = new QPushButton(QStringLiteral("Check Grammar"), this);
......
......@@ -76,6 +76,9 @@ AdBlockSubscription::AdBlockSubscription(const QString &title, QObject *parent)
, mTitle(title)
, mNetworkAccessManager(new QNetworkAccessManager(this))
{
mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
mNetworkAccessManager->enableStrictTransportSecurityStore(true);
}
QString AdBlockSubscription::title() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment