|
|
|
@ -89,6 +89,12 @@ class DiscoveryManager {
|
|
|
|
|
|
|
|
|
|
$responseBody = $response->getBody();
|
|
|
|
|
$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) {
|
|
|
|
|
$replaceWith = str_replace("https://", "http://", $replaceWith);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$responseBodyMangled = str_replace($this->config->getAppValue('richdocuments', 'wopi_internal_url'), $replaceWith, $responseBody);
|
|
|
|
|
// Skylar: Disable saving too, we don't need it if we're not loading ever
|
|
|
|
|
/*$file->putContent(
|
|
|
|
|