Document loading failed | Failed to load Nextcloud Office

I just installed nextcloud on a proxmox container inside a docker container and Nextcloud Office was working fine. However, I was running on the Unencrypted mode.

Once I configured NC to use my reverse proxy (caddy) under HTTPs I wasn’t able to open any files anymore.

I will say that I cannot access NC locally anymore (SSL protocol error) and I can only access it through my external DNS address

This is the only thing I changed in the config:

'trusted_domains' => 
  array (
    0 => '10.0.0.25:8080',
    1 => 'cloud.domainname.net',
  ),
  'trusted_proxies' => ['10.0.0.90'],
  'overwrite.cli.url' => 'https://10.0.0.25:8080',
  'overwriteprotocol' => 'https',

I imagine the reason why I cannot connect locally is that it’s forcing an HTTPs redirect and there’s no HTTPs server running.

I also did add 0.0.0.0/0 to the WOPI requests field, but that didn’t do anything.

I was also trying to setup a TURN server to go through the reverse proxy, but I don’t think that’d cause any problems.

I discovered this is only happening over the Reverse Proxy or maybe just HTTPS. It will work no problem if it’s over HTTP locally.