aboutsummaryrefslogtreecommitdiff
path: root/launcher/net/Download.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-07-11 14:56:09 +0200
committerGitHub <noreply@github.com>2022-07-11 14:56:09 +0200
commit8f4d7ac655d3815605422c9fc620d5a0f97e41ef (patch)
treeb2a0c3fc3e12ac2d4ce7d8d6a8b24c256b500c57 /launcher/net/Download.cpp
parentc5625d8d32f45b6ecb71cf7293176dfe7c6579a3 (diff)
parent87cbff391c28d78a5be3d96a0fd58e224d2ed72e (diff)
downloadPrismLauncher-8f4d7ac655d3815605422c9fc620d5a0f97e41ef.tar.gz
PrismLauncher-8f4d7ac655d3815605422c9fc620d5a0f97e41ef.tar.bz2
PrismLauncher-8f4d7ac655d3815605422c9fc620d5a0f97e41ef.zip
Merge pull request #678 from Scrumplex/improvements-around-proprietary-services
Diffstat (limited to 'launcher/net/Download.cpp')
-rw-r--r--launcher/net/Download.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/launcher/net/Download.cpp b/launcher/net/Download.cpp
index 3061e32e..e6a6adcc 100644
--- a/launcher/net/Download.cpp
+++ b/launcher/net/Download.cpp
@@ -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);