ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.64k stars 311 forks source link

DesktopEditor downgrading https requests to http when connecting to OwnCloud server hosted on LAN #1562

Closed anshulthakur closed 2 months ago

anshulthakur commented 2 months ago

This issue is unique.

Operating System

Windows 10 / 8.1 / 7, Linux (DEB package)

Version information

8.0.1.31 (x64 exe)

Expected Behavior

When connecting to the https OwnCloud server, the Desktop Client should be able to connect seamlessly using https.

Actual Behavior

The Owncloud server is hosted on an https only server. The Desktop Editor when connection to the https URL overrides the URL and sends the request to HTTP URL instead (as seen in the developer options).

Reproduction Steps

No response

Additional information

Initially, the Owncloud was hosted on http. At that time, Onlyoffice Desktop Editor was able to connect to it without issues. Later, we installed SSL certificates for LAN usage as well. Since then, the Desktop Editor keeps downgrading the request to HTTP.

Deleting the AppData folder and reinstalling do not work either.

anshulthakur commented 2 months ago

Update: The issue was at OwnCloud end. After upgrading to https, some portions of the OwnCloud servers were not fully configured to use the https version and were responding with an HTTP response. Updating the config fixed this issue.

The SSL was being terminated at the proxy server. So Owncloud did not know if it is running on HTTP or HTTPS. To overcome this issue, we need to override Owncloud's protocol by adding 'overwriteprotocol' => 'https' to /ocis/own_cloud/config/config.php