Cannot access Onlyoffice document when i enable https

Hi all, I’d really appreciate your help with Onlyoffice on newly installed Nextcloud with https. Everything else seems to be working fine with https.

OS: Debian 11.6
Nextcloud Hub 3 (25.0.3)
Community Document Server 0.1.13

Many thanks,

I’m attaching the Onlyoffice settings and the error when trying to open document


One more thing to add, the https is provided by caddy installed on another system. The Caddyfile looks like below. is the ip address of nextcloud/docuserver/onlyoffice. {