t-rex-tileserver / t-rex

t-rex is a vector tile server specialized on publishing MVT tiles from your own data
https://t-rex.tileserver.ch/
MIT License
556 stars 69 forks source link

what is best approach to replace favicon.ico? #278

Open pvgenuchten opened 2 years ago

pvgenuchten commented 2 years ago

I tried replacing favicon.ico by placing it in a folder /tmp then in config reference the static folder as /tmp and path / favicon gets correctly replaced, but a side-effect is that any other path outside static, returns 404:

pka commented 2 years ago

It's working at least with a non-root path:

[[webserver.static]]
path = "/static"
dir = "./public/"

favicon link in index.html:

<link rel="icon" href="/static/favicon.ico" />

I'll check whether it's also possible with path /