Hello everyone, recently I’m deploying phoenix app to fly.io, when I’m accessing the favicon.ico via link (domain.com/favicon.ico) it’s accessible and robots.txt too, but why I can’t access (Not Found) the name.sh file that is in the same folder with favicon.ico and robots.txt? is there something that I miss or doing it wrong?
Hi @mir,
Yes, the name.sh
file should not be accessible by default.
In Phoenix 1.6.x projects, the config is in the endpoint.ex
file. Like this:
plug Plug.Static,
at: "/",
from: :my_app,
gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt)
In Phoenix 1.7 projects, the config was moved to the my_app_web.ex
file and looks like this:
def static_paths, do: ~w(assets css fonts images webfonts audio js favicon.ico robots.txt)
It is a protection as an explicitly allowed list.
1 Like