Closed soleofthesea closed 4 months ago
you mean that you have a reverse-proxy that maps /files to your HFS root? https://github.com/rejetto/hfs/wiki/Reverse-proxy
Yes, that is correct.
ok, the solution to your problem is in the link that i posted above.
You should already see a link saying "Read our guide on proxies" inside the home page of the Admin-panel. Can you confirm?
My NGINX config params are identical to the example provided and I have indeed setup the correct URL in section 'Internet'.
To note, the proxy itself works, and so is the option I am filing this bug report for - as long as you have put a leading / at the start. But the settings allow you to omit it.
you say the setting "allow" you to omit the leading /, but that sounds right, as i expect some cases you want to have relative links, instead of absolute links. In the end you can enter anything, right?
can you enter the leading / correctly in the field?
anyway, i had a closer look to the "redirect" function, and if i'm not mistaken, you are supposed to just enter "/" there, and your prefix of the reverse proxy should be prepended automatically. Can you give me a feedback about this?
ok, maybe now i'm seeing what's happening here. the logic i'm applying for redirection is to automatically prefix with the reverse-proxy-prefix ONLY if the address you enter starts with / This was supposed to allow relative links, but from what you are saying it seems this is not working correctly. I'm going to test it.
the logic i'm applying for redirection is to automatically prefix with the reverse-proxy-prefix ONLY if the address you enter starts with /
Yes, that's the part I'm hung up on. Is it intentional?
it was intentional, but i still have to understand if that's the right thing to do
please let me know about this
anyway, i had a closer look to the "redirect" function, and if i'm not mistaken, you are supposed to just enter "/" there, and your prefix of the reverse proxy should be prepended automatically. Can you give me a feedback about this?
anyway, i had a closer look to the "redirect" function, and if i'm not mistaken, you are supposed to just enter "/" there, and your prefix of the reverse proxy should be prepended automatically. Can you give me a feedback about this?
Yup, no issues.
(Also I apologize: I used 'files' both for the NGINX location and the HFS subfolder. So the URL is https://example.com/files/Files
. That must be confusing.)
I must admit, I'm not understanding what is the relative link feature intended for? As in, if I only type in foo
, then where is it supposed to take me?
the relative is for when you login while NOT in the root.
if you have "files" already in nginx configuration, you probably want hfs to not have the "files" folder, but just all things in the home.
while testing, i've found that the account-redirect feature is broken since 0.52.1 😅
i just updated the wiki page to include x-forwarded-host in the configuration. some features (like roots, that you may not use) will not work with it.
and i've just found a bug about roots+proxy. All fixed in next release.
ok, all fixed in 0.52.6 thanks
Let's say I have a HFS server that can be accessed via
https://example.com/files
.If I open the Admin panel -> Accounts, there is the option 'Redirect' to automtically bring the user to a certain folder.
If I input
foo
, logging in will take me tohttps://example.com/foo
, with thefiles
part deleted. Browsing files works, but attempting to open anything returns a 404.If I input
/foo
, then everything works properly.