homebridge-config-ui-x icon indicating copy to clipboard operation
homebridge-config-ui-x copied to clipboard

Web Root Feature request

Open ajdaniel opened this issue 4 years ago • 55 comments

It is a pain for me to not be able to specify a web root path e.g. /homebridgeui So I can proxy more effectively on my system instead of having to use the root.

Describe the solution you'd like: I would like to be able to have an option to provide a web root path, such as /homebridgeui which means all UI is prefixed with that path. This allows me to use NGINX to proxy all of my applications that all run on / on a single system across multiple ports.

Describe alternatives you've considered: Can't find a way around this yet.

Additional context: I run homebridge on the same home server as a tool called Tautulli, which provides this option and looks like this:

image

ajdaniel avatar Jun 18 '20 13:06 ajdaniel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 18 '20 15:07 stale[bot]

+1 on this, to prevent stale bot closing it!

htims1989 avatar Jul 21 '20 06:07 htims1989

+1 please keep this alive - closing feature requests that are old is not a good idea

ajdaniel avatar Jul 23 '20 08:07 ajdaniel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 22 '20 18:08 stale[bot]

Keeping this open!

ajdaniel avatar Aug 22 '20 18:08 ajdaniel

Yes please! An option like the one described in config.json would be cool. https://github.com/oznu/homebridge-config-ui-x/wiki/Config-Options#proxyhost

XVII avatar Sep 10 '20 10:09 XVII

+1 That would be a useful feature

ingria avatar Sep 16 '20 21:09 ingria

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 17 '20 02:10 stale[bot]

Wow stale bot is keen

XVII avatar Oct 17 '20 02:10 XVII

+1

hroland avatar Oct 19 '20 00:10 hroland

+1 to keep this alive

NicolasLiampotis avatar Nov 14 '20 18:11 NicolasLiampotis

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 18 '20 06:12 stale[bot]

+1 to keep alive

xbrunosousa avatar Dec 18 '20 07:12 xbrunosousa

Does anyone have any suggestions on how to implement this feature? If we make a start on how to implement, then it should be more like that it gets picked up and done.

ajdaniel avatar Dec 18 '20 10:12 ajdaniel

It does look like the way to go forward with this is to implement a config variable which is applied to the prefix attribute in the Fastify init https://www.fastify.io/docs/latest/Server/#prefix

ajdaniel avatar Dec 18 '20 10:12 ajdaniel

Does anyone have any suggestions on how to implement this feature? If we make a start on how to implement, then it should be more like that it gets picked up and done.

You probably don't need a config — HTML markup can be made relative, and JavaScript can figure out the path on its own. If this is true, the issue would become much simpler.

https://github.com/oznu/homebridge-config-ui-x/blob/66c1e5d61b9d197cdb6408716e33a13bf25883af/ui/src/index.html#L7-L18

These relative URLs would need to change from absolute path to relative, for example, from /assets to ./assets. (I am not sure why there is a <base href="/"> in the markup; I couldn't find HB serving any pages under a sub-directory path.)

The links and the image paths on the top navbar would need to be relative too (I only casually search the code on GitHub, perhaps there are more links/image paths):

https://github.com/oznu/homebridge-config-ui-x/blob/bbd2299e21ecfb5e2c661f47f698350278bb90cd/ui/src/app/shared/layout/layout.component.html#L5-L6

Same goes to these API socket.io path stored in environment.prod.ts. It can probably deduce to the right URL inline by parsing document.location.pathname.

https://github.com/oznu/homebridge-config-ui-x/blob/3e9fd2e17ffd8263fd8fe9c4444374eb8e3127bd/ui/src/environments/environment.prod.ts#L3-L12

One thing I am not sure is the socket.io URL. Not sure if it will work if you give that ws:/wss: URL a path.

Beyond that I don't see anything outstanding that would need to be fixed.

timdream avatar Dec 19 '20 06:12 timdream

You probably don't need a config

Just to clarify, proxyHost is still needed, otherwise socket.io will be blocked by CSP. You just don't need a new config.

timdream avatar Dec 19 '20 07:12 timdream

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 18 '21 07:01 stale[bot]

Bump :(

XVII avatar Jan 18 '21 12:01 XVII

Is this related to issue #628 ? Commenting to bump if so!

leaky0320 avatar Jan 31 '21 04:01 leaky0320

Is this related to issue #628 ? Commenting to bump if so!

Yes, it is.

ronald8192 avatar Feb 08 '21 10:02 ronald8192

Would really like to see this.

rhyssmith avatar Feb 14 '21 14:02 rhyssmith

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 17 '21 02:03 github-actions[bot]

Would really like to see this too.

SmolSoftBoi avatar Mar 17 '21 20:03 SmolSoftBoi

Please sir, may I have the ability to use a base directory w/ my reverse proxy?

Commenting to ensure this stays alive and to follow.

gabemunro avatar Apr 06 '21 18:04 gabemunro

+1 for this feature

r-sherwood avatar Apr 30 '21 13:04 r-sherwood

+1

YouveGotMeowxy avatar May 21 '21 02:05 YouveGotMeowxy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 21 '21 02:06 github-actions[bot]

keep this open!

ronald8192 avatar Jun 21 '21 07:06 ronald8192

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 22 '21 02:07 github-actions[bot]