With Nextcloud 18 i switched to the new OnlyOffice integration in Nextcloud. The problem i’m facing is, that my instance is accessible via two different domains. This is working great for almost everything in Nextcloud. But OnlyOffice is only loading for visitors of one (the main) domain. When coming from the secondary domain, an error message pops up, saying “OnlyOffice is currently unavailable.”
Is their a way to configure OnlyOffice to accept users coming from both domains?
Sorry, for my unclear question.
The instance is accessible through different Domains/URLs?
as example: mynextcloud.com (say this is the main one) and mycloud2.com
Then it is possible to access nextcloud through both of them, but using OnlyOffice is only possible when nextcloud is being accessed through mynextcloud.com
I do have here the same problem, serving nextcloud via alias with apache and users use it through different domains. Would be nice to allow in a way like “trusted_domains” in nextcloud-config.
I (and as I understand also @nedal and @jeensg) am using the documentserver app. One of the reason for me to use OnlyOffice instead of Collabora is that it is packaged as a nextcloud app thus very low maintenance.
From my understanding, the document server should accept any request comming from a trusted_domain as would any other app. Maybe we should open an issue on the documentserver github repository
I had the same problem and just found the solution:
Use Case: The same nextcloud installation is available on domainA.com and domainB.com but only one domain can use ONLYOFFICE integration.
https://api.onlyoffice.com/editors/nextcloud:
[…]
Sometimes your network configuration might not allow the requests between installed Nextcloud and ONLYOFFICE Document Server using the public addresses. The Advanced server settings allows to set the ONLYOFFICE Document Server address for internal requests from Nextcloud server and the returning Nextcloud address for the internal requests from ONLYOFFICE Document Server. You need to enter them in the appropriate fields.
[…]
So I adapted my config that all three settings (beside the secret) contain the same domain. It does not matter what domain I use, it works for both of them. The reason for me is simple: both domains are accessible from the nextcloud installation.
However it make me look a bit deeper on the issue, and I realized that the onlyoffice iframe is blocked by the X-FRAME-OPTIONS SAMEORIGIN header. Indeed the main nextctloud page is loaded from domaina.tldn but the iframe comes from domainb.tldn.
So the question is, is there a way to make the onlyoffice url depends on the nextcloud url ? If not we should probably open an issue on github.
Thanks for your effort on this issue. I don’t have the time and knowledge at the moment to following it deeply. But i will be really happy if a solution can be found.