pad.libre-service.eu-etherpad/src/node
muxator a817acbbcc security: when served over https, set the "secure" flag for "express_sid" and "language" cookie
The mechanism used for determining if the application is being served over SSL
is wrapped by the "express-session" library for "express_sid", and manual for
the "language" cookie, but it's very similar in both cases.

The "secure" flag is set if one of these is true:

1. we are directly serving Etherpad over SSL using the native nodejs
   functionality, via the "ssl" options in settings.json

2. Etherpad is being served in plaintext by nodejs, but we are using a reverse
   proxy for terminating the SSL for us;
   In this case, the user has to be instructed to properly set trustProxy: true
   in settings.json, and the information wheter the application is over SSL or
   not will be extracted from the X-Forwarded-Proto HTTP header.

Please note that this will not be compatible with applications being served over
http and https at the same time.

The change on webaccess.js amends 009b61b338, which did not work when the SSL
termination was performed by a reverse proxy.

Reference for automatic "express_sid" configuration:
https://github.com/expressjs/session/blob/v1.17.0/README.md#cookiesecure

Closes #3561.
2019-12-07 04:36:01 +01:00
..
db formatting: bulk remove trailing whitespaces 2019-10-20 02:09:22 +02:00
eejs use latest ejs 2015-04-11 09:53:27 +01:00
handler handler/PadMessageHandler.js: handleMessage() got the wrong padId for read only pads 2019-03-27 18:29:12 +01:00
hooks security: when served over https, set the "secure" flag for "express_sid" and "language" cookie 2019-12-07 04:36:01 +01:00
utils referer: change referrer policy. Stop sending referers as much as possible 2019-11-25 00:05:40 +01:00
easysync_tests.js Revert "51c14d994756e60333b0b60eccb7255cf0c86461 changed the return value of" 2015-02-16 06:22:49 +01:00
padaccess.js access controls: promisification 2019-01-23 16:29:36 +00:00
README.md minor typo fix 2019-08-08 21:58:30 +02:00
server.js runtime: deprecate node 8.x. Require node >= 10.13.0 starting from Etherpad 1.8.3 2019-10-20 00:02:00 +02:00
stats.js node8: we no longer need to use a shim for Object.values in stats.js 2019-02-19 22:01:12 +01:00

About the folder structure

  • db - all modules that are accessing the data structure and are communicating directly to the database
  • handler - all modules that respond directly to requests/messages of the browser
  • utils - helper modules

Module name conventions

Module file names start with a capital letter and uses camelCase

Where does it start?

server.js is started directly