Merge pull request #678 from Scrumplex/improvements-around-proprietary-services

This commit is contained in:
Sefa Eyeoglu
2022-07-11 14:56:09 +02:00
committed by GitHub
17 changed files with 223 additions and 59 deletions

View File

@ -118,8 +118,9 @@ void Download::executeTask()
}
request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8());
if (request.url().host().contains("api.curseforge.com")) {
request.setRawHeader("x-api-key", APPLICATION->getCurseKey().toUtf8());
if (APPLICATION->currentCapabilities() & Application::SupportsFlame
&& request.url().host().contains("api.curseforge.com")) {
request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8());
};
QNetworkReply* rep = m_network->get(request);