Erik Michelson 90c5ab0833
Exclude /metrics and /status routes from session initialization
This commit adds a `useUnless` helper method which can be used as a middleware for express.
It receives an express-middleware and an array of paths.
When a request matches one of the given paths, this middleware does nothing.
Otherwise the given middleware is called.

For the express-session middleware this helper middleware is used to avoid session creation on purely status routes.
See #1446

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-07-20 23:56:54 +02:00
..
2020-12-02 19:39:06 +01:00
2021-05-09 19:28:44 +02:00
2018-11-13 23:30:13 +01:00
2021-05-17 18:46:00 +02:00
2021-02-15 12:15:14 +01:00
2021-06-07 23:04:45 +02:00
2021-02-15 12:15:14 +01:00
2021-02-15 12:15:14 +01:00
2019-05-31 00:30:29 +02:00
2021-04-25 20:06:56 +02:00
2021-02-15 12:15:14 +01:00