Seafile 12 Docker, network error

After installing Seafile 12 in Docker with an HA proxy in front of it, everything works except data upload and sharing via link. The generated link does not have https.
The following entries are made in “seahub_settings.py”:
SERVICE_URL = "https://seafile.domain.ch"
FILE_SERVER_ROOT = 'https://seafile.domain.ch/seafhttp'
Where could the error be?

+-------------+  443    +-----------+    80     +---------+     80      +----------+
|   Browser   | ------->|  HAProxy  | --------> | Caddy   | ----------> |  Seafile |
+-------------+         +-----------+           +---------+             +----------+

Does anyone have an idea?

If you use HAProxy, it is better to remove caddy.

Note, SERVICE_URL and FILE_SERVER_ROOT are no longer used since version 12.0.

Make sure SEAFILE_SERVER_HOSTNAME and SEAFILE_SERVER_PROTOCOL are set correctly in .env file. If not, change them to correct value and restart the docker container.

If you have this error in desktop browser, use Chrome/Firefox debug mode to find out which address is being used when clicking download button and whether it is correct.