Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chain_logo.png and currency_logo.png not accessible #149

Closed
simonzg opened this issue Jul 9, 2024 · 3 comments
Closed

chain_logo.png and currency_logo.png not accessible #149

simonzg opened this issue Jul 9, 2024 · 3 comments

Comments

@simonzg
Copy link

simonzg commented Jul 9, 2024

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
Copy link

Pana commented Jul 11, 2024

same issue here

@simonzg
Copy link
Author

simonzg commented Jul 12, 2024

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

@simonzg simonzg closed this as completed Jul 12, 2024
@lance-web3
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants