Open lutzgruber opened 4 years ago
I would be fine with that similar to the public_wopi_url config switch we have in https://github.com/nextcloud/richdocuments/pull/483
Pull requests are welcome.
Could you please provide any pointers how I can access (server-side) config settings from client-side javascript code?
I have a setup where nextcloud and collabora are running on the same host and the reverse proxy that is doing the tls termination is relatively slow. Am I right to assume that the proposed setting would allow me to set WOPISrc to http://localhost/nextcloud/
and therefore bypass the reverse proxy? That would be very useful!
Hi, this is a feature request for function
getWopiUrl
in source filerichdocuments/src/helpers/url.js
:The current definition of the WOPI URL as
const wopiurl = window.location.protocol + '//' + window.location.host + getRootUrl() + '/index.php/apps/richdocuments/wopi/files/' + fileId
leads to problems when the libreoffice online webservice cannot access the nextcloud service at the location of the browser window (window.location.protocol + '//' + window.location.host
).This can be the case when different proxies or firewall restrictions apply to the end user's device and the libreoffice online webservice host. A trivial way to reproduce this problem is to access nextcloud at
localhost
; the libreoffice online webservice then receives alocalhost
URL that it cannot resolve if it runs in a different docker container or on a different machine.My proposed solution is to add a config setting
wopi_host
on the CODE admin page that lets the nextcloud admin specify the wopi host, and to use that host instead ofwindow.location.protocol + '//' + window.location.host
to definewopiurl
inrichdocuments/src/helpers/url.js
.Thank you.