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

Internal URL string when using paths #272

Open
egooner opened this issue Nov 12, 2022 · 7 comments
Open

Internal URL string when using paths #272

egooner opened this issue Nov 12, 2022 · 7 comments
Labels
question Further information is requested

Comments

@egooner
Copy link

egooner commented Nov 12, 2022

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!?

@timothystewart6
Copy link
Contributor

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.

@egooner
Copy link
Author

egooner commented Nov 13, 2022

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!!

@timothystewart6
Copy link
Contributor

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 timothystewart6 added the question Further information is requested label Nov 16, 2022
@egooner
Copy link
Author

egooner commented Nov 16, 2022

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

@timothystewart6
Copy link
Contributor

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

@negimeister
Copy link

+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)

@timothystewart6
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants