littlelink-server icon indicating copy to clipboard operation
littlelink-server copied to clipboard

Internal URL string when using paths

Open egooner opened this issue 1 year ago • 7 comments

Using a root domain this all worked fine but it would be helpful to run multiple copies on paths behind a single domain

eg https://bio.example.com/user1 https://bio.example.com/user2

I notice that in some places when the internal reference has a forward slash and in others it does not.

I think the static content has a / prefixing it which if it were removed should allow for multiple copies of this behind a traefik front end (I hope)

I took a look at the code on a docker install vs what's here and obviously the code is compressed so could not test it but am guessing the Razzle assets all have a leading / which could simply be handled with a substring command!?

egooner avatar Nov 12 '22 01:11 egooner

I think the reverse proxy in front of this should handle this fine? You probably need to create a rule in traefik as middleware for the path.

timothystewart6 avatar Nov 13 '22 22:11 timothystewart6

Yeah a stripPrefix removes the extra path component but for example/static does not have the path component on it and then there is no distinction between site a and site b!!

egooner avatar Nov 13 '22 22:11 egooner

Would adding a rewrite work? TBH this is something that most reverse proxies should be able to handle without the need to change how the site is hosted. All paths should be relative. Sounds like a rewrite might be needed too.

timothystewart6 avatar Nov 16 '22 04:11 timothystewart6

You have the answer there ... All paths should be relative .... css is relative but /static is absolute. The absolute ignores the path I added and tries to go to the root. I have switched to a different implementation so no worries for me. But if you want to enhance it then the issue I believe is still there

egooner avatar Nov 16 '22 07:11 egooner

Thanks! Will take a look when I have some time!

timothystewart6 avatar Nov 16 '22 17:11 timothystewart6

+1 on this, would love to be able to run it on a subpath. I tried using Traefik with prefix stripping, but for some reason the page goes blank as soon as the JS loads in (only if I access it from the subpath, accessing it on root works fine)

negimeister avatar Feb 08 '23 16:02 negimeister

I think I know how to fix this, not straight forward but I think I know how

timothystewart6 avatar Feb 14 '23 04:02 timothystewart6