-
Notifications
You must be signed in to change notification settings - Fork 194
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
consider using relative url for href to work behind a proxy #233
Comments
@panlina Hello, how do you deal with this problem? |
It can not be solved unless you modify the code. You may ask the author to take this into account. |
panlina made a pull request that tries to address this but removes functionality that I'm not immediately prepared to ditch: #237 If you can propose a concrete change that does what you need without removing the baseDir option, I'm all for it. |
show-dir/index.js#L98: // let href = `${parsed.pathname.replace(/\/$/, '')}/${encodeURIComponent(file[0])}`;
let href = `${encodeURIComponent(file[0])}`; The problem between absolute path and relative path can be solved. |
Oh! If that's all that's needed I'll gladly change that behavior, I just need the time to manually QA it |
Yes, that's all that is needed, but I think an option is not needed, just change it to be relative path. |
Options are used to ensure that they do not conflict with the author's previous ideas. |
Understood. That's what I'm asking at the end of my post. |
Hi,
I'm using ecstatic behind a proxy, something like proxying http://localhost/a to http://localhost:8080, where 8080 is the port ecstatic is listening to. The problem is that ecstatic uses absolute url for
href
, which resolves to a url where the file path is directly appended to the host part, instead of the current url.For instance, when browsing from http://localhost/a, clicking folder
f
navigates to http://localhost/f/, instead of http://localhost/a/f/.I noticed that there's a
baseDir
option, but it's irrelevant here since the base url(/a
) is already eaten by the proxy beforebaseDir
applies.Using relative url for
href
may be a solution, but I'm not sure whether you are using absolute path for some reason. How do you think?The text was updated successfully, but these errors were encountered: