Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated onlyoffice index.go to respect url behind proxy #767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ElderBlade
Copy link

This change by JMarcosHP fixes OnlyOffice connection error when run behind nginx proxy manager, reference issue #766

@mickael-kerjean
Copy link
Owner

The PR would break the default setup where the ONLY OFFICE setup come from this and is set to http://onlyoffice/, aka a URL that's not available to the frontend

@JMarcosHP
Copy link

Can there be another alternative?
We need support for custom domains or a way to expose the internal onlyoffice URL for filestash.

@JMarcosHP
Copy link

Or another env variable for external URL that overrides ONLYOFFICE_URL if set.

@mickael-kerjean
Copy link
Owner

mickael-kerjean commented Nov 13, 2024

Or another env variable for external URL that overrides ONLYOFFICE_URL if set.

That wouldn't be great from a end user point of view and that approach will stop working in the next few months. To understand why, we need to dig through how this plugin was done in the first place and why it was made the way it currently is. The general model of this plugin is to proxy the traffic to only office. This proxy approach was taken initially because:

  1. not breaking the global Content Security Policy would be either impossible or an absolute nightmare. Sure the suggested approach currently work because of a temporary dirty hack which will get rolled back once the migration to the new frontend is done. Once that's reenabled, it won't be possible for a third party app to inject code like this and that's a good thing from a security point of view
  2. I didn't want to force anyone to expose only office to the internet. When I see the cheer number of people using Filestash without bothering with SSL, having to create multiple certificates make things potentially a lot more tricky to install.
  3. it gives a way to block traffic to only office if a vulnerability is found

Can there be another alternative?

yes, the best approach is to address the root cause of the issue which is a bug in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants