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

[FEATURE_REQUEST] Base path option #1036

Open
Slyke opened this issue Jan 5, 2023 · 14 comments
Open

[FEATURE_REQUEST] Base path option #1036

Slyke opened this issue Jan 5, 2023 · 14 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing

Comments

@Slyke
Copy link

Slyke commented Jan 5, 2023

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 Slyke added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Jan 5, 2023
@Slyke Slyke changed the title [FEATURE_REQUEST] <title> [FEATURE_REQUEST] Base path option Jan 5, 2023
@danieldietsch
Copy link

danieldietsch commented Jan 9, 2023

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

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 9, 2023
@Usever
Copy link

Usever commented Jan 9, 2023

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

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 10, 2023
@liss-bot

This comment was marked as duplicate.

@liss-bot liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Feb 9, 2023
@Slyke

This comment was marked as duplicate.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed ⚰️ Stale [ISSUE] [PR] No activity for over 1 month labels Feb 9, 2023
@zgurea1

This comment was marked as duplicate.

@Slyke

This comment was marked as off-topic.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Feb 24, 2023
@Lissy93 Lissy93 added the 📌 Keep Open [ISSUE][PR] Prevent auto-closing label Feb 26, 2023
@KiwiActinidia

This comment was marked as duplicate.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Mar 15, 2023
@DAMIOSKIDEV

This comment was marked as duplicate.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jun 9, 2023
@ClenonWolf
Copy link

ClenonWolf commented Oct 3, 2023

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

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Oct 3, 2023
@nguyenleminhquan

This comment was marked as duplicate.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Feb 28, 2024
@ginoclement

This comment was marked as duplicate.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Apr 8, 2024
@rodalpho

This comment was marked as duplicate.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Apr 20, 2024
@Docrom

This comment has been minimized.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Apr 22, 2024
@Sokwva

This comment was marked as spam.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing
Projects
None yet
Development

No branches or pull requests