Open Slyke opened 1 year ago
There is the environment option BASE_URL
, but for me, it does not work as expected.
I tried (as explained in multiple tickets around here and somewhat in https://github.com/Lissy93/dashy/blob/master/docs/management.md#passing-in-environmental-variables) the following.
BASE_URL=dashy/
in my docker-compose.yml,appConfig.routingMode: hash
in conf.yml
, andProxyPass /dashy/ http://127.0.0.1:4000/
or b) ProxyPass /dashy/ http://127.0.0.1:4000/dashy/
For a) I can connect to dashy, but fail to load any assets because the initial response wants to load js and css from / and hence does not get proxied.
For b) (which would be the expected config) I receive Cannot GET /dashy
from the node server.
So, I would very much welcome an implementation of that feature :)
🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more! - dashy/management.md at master · Lissy93/dashy
Same behavior here. Using docker compose with BASE_URL=/dashy. Browser returns error: "Cannot GET /dashy". Seems that BASE_URL env var is broken.
This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.
Still an issue
Still an issue
Why is the liss-bot even turned on for feature requests? @Lissy93 so we don't have to come in every 6 weeks to have the label removed, lol.
Still an issue also for me
Still an issue
Has this issue been fixed yet?
Tried setting BASE_PATH=/dashy/
in docker but it didn't change any of the requests Dashy makes. It still requests http://server/js/
instead of http://server/dashy/js/
.
Still an issue :<
Still an issue
I would find this very helpful too.
Hello, is there any workaround for this issue yet ?
same issue.
There is an example in the documentation here that tells you to use BASE_URL=/dashy
.
However, this does not work. When I load the latest version (3.1.1), I get this error in my browser console: https://example.com/conf.yml 404 (Not Found)
It should be pointing to https://example.com/dashy/conf.yml since this is where the assets should be. In fact, if I navigate to https://example.com/dashy/conf.yml, I can actually see my config! This seems like it should be a straightforward issue to fix, and I would consider it high priority since there is an example in your documentation.
I also see the same behavior for favicon.ico
and loading-screen.css
(not behind /dashy
). Otherwise the page seems to load just fine.
Is your feature request related to a problem? If so, please describe.
No response
Describe the solution you'd like
BasePath or similar option for when behind a reverse proxy.
I can run it fine by directly accessing the IP address, eg: 123.123.123.123:4000, but if this is placed behind a reverse proxy with a subpath Dashy doesn't load at all.
The reason is due to absolute pathing when loading assets.
Lets say Dashy is hosted at
mydomain.com/dashy
, all requests will go tomydomain.com/
. For example when requesting themanifest.json
file, I can see it tries to request frommydomain.com/manifest.json
instead ofmydomain.com/dashy/manifest.json
.Adding in a BasePath or relative pathing config option, will allow for letting Dashy know that it should be requesting from a subdirectory.
I quickly checked the Config docs, but couldn't see anything relevant: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
I would imagine this would fall under the appConfig section.
Reopened since #923 was automatically closed.
Priority
Medium (Would be very useful)
Is this something you would be keen to implement
Yes!