mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-23 15:50:54 +01:00
3cedf474e5
The hostname:port of URIs used in Minify are currently bogus and refer to localhost only for historical reasons; there's no reason to retain them and omitting them avoids generating an invalid URI when "port" is not an integer. Context: settings.port is passed to express's listen; if not numeric, it is used a filename for a Unix domain socket. This allows e.g. starting a server to be reverse-proxied on a multi-user system, using the filesystem to handle access control and avoiding need to allocate port numbers. Before this change, etherpad-lite starts without error when configured to listen on a Unix domain socket in this manner. However, `pad.js` and `ace2_common.js` are generated incorrecting, causing an error "Uncaught Error: The module at "ep_etherpad-lite/static/js/rjquery" does not exist." when loading the editor: When settings.port is a non-numeric string, e.g. `etherpad.sock`, a URI of the form `http://localhost:etherpad.sock/static/js/rjquery.js` is generated and parsed to find the file needed. In this case, the file searched for is `:etherpad.sock/static/js/rjquery.js`, rather than the expected `static/js/rjquery.js`. No such file exists, and the required code is silently omitted from the bundle. As a workaround, hard-code a (meaningless) hostname which can be parsed correctly, since the current code makes no use of it anyway. |
||
---|---|---|
.. | ||
express | ||
express.js | ||
i18n.js |