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

Support custom port for onlyoffice #5899

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

Conversation

thoschaefer
Copy link

@thoschaefer thoschaefer commented Jan 17, 2025

In some cases, like usage of Nextcloud at home with a single IPv4 only, it is required to deploy the Nextcloud UI on a different port than 443. This can be achieved by configuring a domain value like "example.com:12345" in the mastercontainer's configuration.json file and using a custom reverse proxy configuration.

However onlyoffice will not work in this case. It relies on the X-Forwarded-Host header set in the Caddy config and will use the domain "https://example.com" without the custom port when constructing it's Javascript requests.

Caddy supports the variable {http.request.hostport}. By using this in the Caddyfile we can add support for custom ports.

Signed-off-by: Thorsten Schaefer <[email protected]>
@thoschaefer thoschaefer force-pushed the fix/onlyoffice_custom_port branch from 4eed591 to a425f5b Compare January 17, 2025 18:07
@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Jan 19, 2025
@szaimen szaimen added this to the next milestone Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants