Fails to set https for URLs when behind proxy
I serve nextcloud (18) via a reverse proxy that handles the SSL certificate handling. It simply passes on all traffic to another server within the same network. At first when I installed documentserver_community it failed to save the ONLYOFFICE settings and displayed a 405 response in the browser. That's when I noticed that the address that had been automatically populated was with http rather than https and I had to change that manually. After that it worked and it was possible to configure ONLYOFFICE.

Then however, when I open a document the editor fails to load due to a similar error:

The relevant lines in the console are (excuse the Swedish strings, basically just saying that the resource is blocked due content loaded over http):
Content Security Policy: Sidans inställningar blockerade laddningen av en resurs på inline (“script-src”).
Blockerade laddning av blandat aktivt innehåll “http://[REDACTED]/apps/documentserver_community/open/404012113/Editor.bin”
Let me know if there is anything else I can provide to help debug!
Probably also worth mentioning that X-Forward-Proto is set on the nginx proxy:
proxy_set_header X-Forwarded-Proto $scheme;
same problem here (setup: docker + reverse proxy)
error message in English:
Content Security Policy: The page’s settings blocked the loading of a resource at http://nextcloud.instance/apps/documentserver_community/open/1234567890/Editor.bin (“connect-src”).
You can configure nextcloud to use https for the url's it generated by adding
'overwriteprotocol' => 'https' to your config.php
@icewind1991 that fixed it! But shouldn't this be detected correctly somewhere in the stack? Do you reckon that this should be considered an issue for nextcloud/server?
I don't get why this happens because in the onlyoffice connector settings I set the document server URL starting with https, not http
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 60 days. Thank you for your contribution!
Retaking repo management include inheritance of old, not treated, and probablty obsolete issues, this is why it was decided to mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.