diff options
Diffstat (limited to 'launcher/net')
-rw-r--r-- | launcher/net/Download.cpp | 3 | ||||
-rw-r--r-- | launcher/net/Upload.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/launcher/net/Download.cpp b/launcher/net/Download.cpp index 0557f2e3..e73f662f 100644 --- a/launcher/net/Download.cpp +++ b/launcher/net/Download.cpp @@ -117,7 +117,8 @@ void Download::executeTask() } request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8()); - if (request.url().host().contains("api.curseforge.com")) { + if (APPLICATION->currentCapabilities() & Application::SupportsFlame + && request.url().host().contains("api.curseforge.com")) { request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8()); }; diff --git a/launcher/net/Upload.cpp b/launcher/net/Upload.cpp index 2173bd08..496120b4 100644 --- a/launcher/net/Upload.cpp +++ b/launcher/net/Upload.cpp @@ -174,7 +174,8 @@ namespace Net { } request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8()); - if (request.url().host().contains("api.curseforge.com")) { + if (APPLICATION->currentCapabilities() & Application::SupportsFlame + && request.url().host().contains("api.curseforge.com")) { request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8()); } //TODO other types of post requests ? |