On my end I was already using Caddy as a reverse proxy and I just added handle rule in my Caddyfile to rewrite the JS responses for OnlyOffice to enable mobile editing:
https://my.super.domain:443 {
# Default reverse proxy
reverse_proxy nextcloud-aio-apache:11000
# OnlyOffice-specific replacement rules to enable mobile-editing (premium feature)
handle /onlyoffice/*/web-apps/apps/*/mobile/dist/js/app.js {
reverse_proxy nextcloud-aio-apache:11000 {
# Disable compression so replacement can work
header_up Accept-Encoding identity
}
replace {
match {
header Content-Type application/javascript*
}
isSupportEditFeature=()=>!1 isSupportEditFeature=()=>!0
}
}
}
Iβm sure something similar is possible with NGINX and other reverse proxies but I havenβt tried.
Note: this wonβt unlock the 20-connection limit but IMO if you need that then you should pay them, itβs fair to buy it if you use it like that.
I just asked ChatGPT and here is what it recommended for NGINX, I havenβt tried though but someone else could maybe?
server {
...
location ~ ^/onlyoffice/.*/web-apps/apps/.*/mobile/dist/js/app\.js$ {
proxy_pass http://nextcloud-aio-apache:11000;
# Disable compression so body replacement works
proxy_set_header Accept-Encoding "";
sub_filter_types application/javascript;
sub_filter "isSupportEditFeature=()=>!1" "isSupportEditFeature=()=>!0";
sub_filter_once off; # Replace all occurrences, not just the first
}
You need the ngx_http_sub_module enabled for this to work, but according to ChatGPT itβs shipped by default in most distros, otherwise you can find online how to enable it in NGINX.
I asked and answered myself.
The problem was in the NginX Reverse Proxy configuration.
However, with version 8.3.1 DS worked fine.
I am attaching the final configuration, with which 8.3.3 started.