diff --git a/lib/WOPI/DiscoveryManager.php b/lib/WOPI/DiscoveryManager.php index 5c646f8a..e4916876 100644 --- a/lib/WOPI/DiscoveryManager.php +++ b/lib/WOPI/DiscoveryManager.php @@ -91,7 +91,7 @@ class DiscoveryManager { $replaceWith = str_replace("hostname.host", $_SERVER['HTTP_HOST'], $this->config->getAppValue('richdocuments', 'wopi_url')); // Use plain HTTP for .onion/TOR - if (strpos($this->config->getAppValue('richdocuments', 'wopi_url'), ".onion") !== FALSE) { + if (strpos($replaceWith, ".onion") !== FALSE) { $replaceWith = str_replace("https://", "http://", $replaceWith); }