-
Notifications
You must be signed in to change notification settings - Fork 161
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
Form the file url into a complete url. #480
base: master
Are you sure you want to change the base?
Conversation
…service behind a reverse proxy with extra parts in url.
By the way, I use apache2 as reverse proxy server and the conf for onlyoffice documentserver looks like this. You can use nginx if you like. Just make sure that it serves behind "/utils/onlyoffice" corresponding to the value in the config file
|
@YK-Samgo I want to clarify:
This probably works by replacing |
Yes, you're right. The function Now, the files can be saved correctly. By the way, this problem may link to some issues on failing to save documents, but I can't tell which issues. |
@YK-Samgo The "externalHost" value is expected to be a host address, not a relative value. In your example, the http://192.168.0.28/utils/onlyoffice address will be used instead of the current address when creating URLs for requests to the editor. When using a proxy, it is necessary to correctly pass the request addresses to the editor via headers. In that case, the file URL will be correctly formed and will be accessible from Nextcloud. You can find more information and examples of proxy configuration here: https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx. |
Check the file url into a complete url to support onlyoffice documentservice behind a reverse proxy with extra parts in url.
For some reasons, I deploy onlyoffice documentserver behind a reverseproxy with extra parts in path, and one item in the config file
/etc/onlyoffice/documentserver/default.json
is modified like this, so that the onlyoffice documentserver is served athttp://192.168.0.28/utils/onlyoffice/
and everything works properly.However, when it comes to config onlyoffice in nextcloud, an error occurs (I just pick out part of the log that can locate the problem):
The function
OC\Http\Client\Client->get()
requires a complete link as the param, but in this case, it only gets thepath
part of the url. A browser like chrome knows to get the resource from the same host so it works properly, but this plugin can't handle this case.So I make it reacts like the browser and forms the file url into a complete url.