Skip to content

Commit a9aa0d7

Browse files
committed
fix: use an indepentant URL for checking internet connectivtiy
1 parent a9d3918 commit a9aa0d7

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

changelog/unreleased/41506

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Change: Use configurable URL for internet connectivity check
2+
3+
Default URL is now configurable and the default is set to an independent
4+
resource: https://detectportal.firefox.com/success.txt
5+
This also provides an IPv6 compatible URL.
6+
7+
https://github.com/owncloud/core/pull/41506
8+
https://github.com/owncloud/core/issues/41465

config/config.sample.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,10 @@
758758
*/
759759
'has_internet_connection' => true,
760760

761+
/**
762+
* The following URL is used to detect internet connectivity.
763+
*/
764+
'internet_connectivity_detect_url' => 'https://detectportal.firefox.com/success.txt',
761765
/**
762766
* Check for a `.well-known` setup
763767
* Allows ownCloud to verify a working .well-known URL redirect.

settings/Controller/CheckSetupController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ private function isInternetConnectionWorking(): bool {
8383
}
8484

8585
try {
86+
$detectUrl = $this->config->getSystemValue('internet_connectivity_detect_url', 'https://detectportal.firefox.com/success.txt');
8687
$client = $this->clientService->newClient();
87-
$client->get('https://www.owncloud.com/');
88-
$client->get('http://www.owncloud.com/');
88+
$client->get($detectUrl);
8989
return true;
9090
} catch (\Exception $e) {
9191
return false;

0 commit comments

Comments
 (0)