dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[FEATURE_REQUEST] Base path option

Open Slyke opened this issue 2 years ago โ€ข 15 comments
trafficstars

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 to mydomain.com/. For example when requesting the manifest.json file, I can see it tries to request from mydomain.com/manifest.json instead of mydomain.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!

๐Ÿš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more! - dashy/configuring.md at master ยท Lissy93/dashy

Slyke avatar Jan 05 '23 04:01 Slyke

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.

  • set BASE_URL=dashy/ in my docker-compose.yml,
  • set appConfig.routingMode: hash in conf.yml, and
  • use apache reverse proxy with a) ProxyPass /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

danieldietsch avatar Jan 09 '23 11:01 danieldietsch

Same behavior here. Using docker compose with BASE_URL=/dashy. Browser returns error: "Cannot GET /dashy". Seems that BASE_URL env var is broken.

Usever avatar Jan 09 '23 12:01 Usever

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.

liss-bot avatar Feb 09 '23 01:02 liss-bot

Still an issue

Slyke avatar Feb 09 '23 02:02 Slyke

Still an issue

zgurea1 avatar Feb 23 '23 09:02 zgurea1

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.

Slyke avatar Feb 23 '23 10:02 Slyke

Still an issue also for me

KiwiActinidia avatar Mar 15 '23 20:03 KiwiActinidia

Still an issue

InspecteurKepler avatar Jun 09 '23 11:06 InspecteurKepler

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/.

ClenonWolf avatar Oct 03 '23 20:10 ClenonWolf

Still an issue :<

nguyenleminhquan avatar Dec 21 '23 01:12 nguyenleminhquan

Still an issue

ginoclement avatar Apr 08 '24 23:04 ginoclement

I would find this very helpful too.

rodalpho avatar Apr 20 '24 16:04 rodalpho

Hello, is there any workaround for this issue yet ?

Docrom avatar Apr 22 '24 14:04 Docrom

same issue.

Sokwva avatar May 28 '24 05:05 Sokwva