aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-01-16 10:16:05 +0100
committerGitHub <noreply@github.com>2024-01-16 10:16:05 +0100
commit85849767f2a001c010ede91bb5d027281aca9736 (patch)
tree5748ae8c7f5c4baa45dd5a1cece26f55dd0b3a18 /lib
parent80d58f01629214a769e20e5381dd2bac915fdd2d (diff)
parent57a30e9bbe688bdc4436ba71a5c934d9ef124e35 (diff)
downloadnextcloud-server-85849767f2a001c010ede91bb5d027281aca9736.tar.gz
nextcloud-server-85849767f2a001c010ede91bb5d027281aca9736.zip
Merge pull request #42806 from nextcloud/bugfix/noid/only-send-subscription-key-to-our-appstore
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index 3e76ab2d5da..a693804f50f 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -109,10 +109,13 @@ abstract class Fetcher {
];
}
- // If we have a valid subscription key, send it to the appstore
- $subscriptionKey = $this->config->getAppValue('support', 'subscription_key');
- if ($this->registry->delegateHasValidSubscription() && $subscriptionKey) {
- $options['headers']['X-NC-Subscription-Key'] = $subscriptionKey;
+ if ($this->config->getSystemValueString('appstoreurl', 'https://apps.nextcloud.com/api/v1') === 'https://apps.nextcloud.com/api/v1') {
+ // If we have a valid subscription key, send it to the appstore
+ $subscriptionKey = $this->config->getAppValue('support', 'subscription_key');
+ if ($this->registry->delegateHasValidSubscription() && $subscriptionKey) {
+ $options['headers'] ??= [];
+ $options['headers']['X-NC-Subscription-Key'] = $subscriptionKey;
+ }
}
$client = $this->clientService->newClient();