Skip to content

made url relative#2912

Merged
muxator merged 1 commit intoether:developfrom
benschweizer:develop
Apr 19, 2018
Merged

made url relative#2912
muxator merged 1 commit intoether:developfrom
benschweizer:develop

Conversation

@benschweizer
Copy link
Copy Markdown
Contributor

I have etherpad installed in a subdirectory

@Gared
Copy link
Copy Markdown
Member

Gared commented Mar 13, 2016

Can anyone confirm this?

@michael-dev
Copy link
Copy Markdown
Contributor

I have etherpad lite mod_proxied in an subdirectory as well and see in access.log requests for /ep/pad/connection-diagnostic-info, which cannot be proxied due to missing subdirectory prefix.

girgen added a commit to girgen/etherpad-lite that referenced this pull request Apr 13, 2018
@girgen
Copy link
Copy Markdown

girgen commented Apr 16, 2018

Yes, this change is correct. If Etherpad is proxied, this fixed is absoutely requried for EP to work correctly. Please merge.

@muxator
Copy link
Copy Markdown
Contributor

muxator commented Apr 16, 2018

I am a bit uncomfortable because it seems that there is already a mechanism in place to build correct (albeit absolute) urls when ep is proxied (see for example https://github.com/ether/etherpad-lite/blob/develop/src/static/js/pad.js#L194-L195).

This change makes the url relative (which is fine), but shouldn't we stick to a single strategy?

@girgen
Copy link
Copy Markdown

girgen commented Apr 16, 2018

Well, something needs to be done. We saw access to apache for /ep/pad/connection-diagnostic-info before changing that, although we root etherpad at /etherpad. Stick to single strategy sounds great, but it need need be applied here in that case. Seems it is not happening just now?

@muxator muxator merged commit d26df86 into ether:develop Apr 19, 2018
@muxator
Copy link
Copy Markdown
Contributor

muxator commented Apr 19, 2018

The fix is beneficial. Merged, thanks.

@CXCV: next time, it would be appreciated if the commit message (and the issue itself) contained a short one-line summary of the problem, with a description in the body of the message, for example:

diagnostic-info: made url relative

After a failed attempt to reconnect to the server, the
client sends a diagnostic message to an absolute
endpoint.
This was prone to breakage when etherpad was reverse
proxied in a subdirectory.

@webzwo0i
Copy link
Copy Markdown
Member

webzwo0i commented Jul 23, 2020

@benschweizer @michael-dev @girgen
Can you please elaborate on your configuration? Are you using the example config from https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy?
How do you handle requests to /locales.json /pluginfw/plugin-definitions.json /admin or /jserror?

The change here breaks functionality for standard installations

@benschweizer
Copy link
Copy Markdown
Contributor Author

I cannot reproduce it anymore as the PR iss 2+ years old and the setup changed since then

@girgen
Copy link
Copy Markdown

girgen commented Aug 3, 2020

We use apache with just

ProxyPassMatch /etherpad/(.*) http://127.0.0.1:9001/$1

@webzwo0i
Copy link
Copy Markdown
Member

webzwo0i commented Aug 3, 2020

Thanks, appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants