.onion/TOR clients are no longer served HTTPS
This commit is contained in:
parent
5a52bd67d4
commit
189ed76a62
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user