safe-global / safe-infrastructure

One `docker-compose.yml` file to rule them all
MIT License
56 stars 92 forks source link

`chain_logo.png` and `currency_logo.png` not accessible #149

Closed simonzg closed 1 month ago

simonzg commented 1 month ago

I'm trying to add a network with a customized network and currency logo, and the upload is successful. However, when I try to access the URL generated by cfg service Screenshot 2024-07-09 at 10 55 47 AM

http://safegw.meter.io:8000/cfg/media/chains/82/chain_logo.png

it's giving me Page not found

Screenshot 2024-07-09 at 10 58 55 AM

Same thing for currency_logo.png.

Pana commented 1 month ago

same issue here

simonzg commented 1 month ago

I found a solution myself @Pana

  1. set these two lines in container_env_files/cfg.env.
MEDIA_URL=/media/
MEDIA_ROOT=/app/media
  1. And then you need to add one line in docker/nginx/nginx.conf before location /cfg/ {
        rewrite ^(/(media)(/.*)?)$ /cfg$1 last;
  1. Now docker compose up and re-upload images and you should be able to see logos.

Screenshot 2024-07-11 at 5 18 10 PM

lance-web3 commented 3 weeks ago

@simonzg the solution seems to only work for dns, can it work for IP?

on console, it is request to nginx instead of IP image