Seafile: /media/avatars loading from the wrong URL

Hi,

I have an issue with my Seafile server. I set up seafile 7.0.4 with an nginx reverse proxy, and HTTPS. I have correctly set the URLs in the configuration files, but it keeps attempting to load avatars from htt p://cloud.example.com:8000/media/avatars, while I expect it to load them from http s://cloud.example.com/media/avatars.
(I have broken the links because the forum does not allow them.)

Loading mixed (insecure) display content “htt p://cloud.example.com:8000/media/avatars/default.png” on a secure page 3 bundle.common.2897a2bdf8ec.js:1:1293643

Here is my nginx vhost:
http s://del.dog/roxivahilo.nginx

Any help is appreciated, thanks!

I am basically encountering the same issue on Ubuntu 18.04 also with nginx and the same version of seafile.

The documentation Enabling Https with Nginx sets another header you didn’t set but only in the first location block:

proxy_set_header X-Forwarded-Proto https;

At least for me this issue remains the same if the header is set.
I run, except for some ssl-cipher settings and the server_tokens off directive and changed urls, the example config from the docs.

Hi there!

For me the solution was to edit the SERVICE_URL under System Admin -> Settings.
I forgot to change it to https after enabling SSL :sweat_smile:
if it does not work after that check out this post on the seafile forum:
For Apache: Avatar in share dialog missing
For Nginx: Avatar in share dialog missing
(both in the same topic)

Hopefully this might help someone else too!