mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
fix(router): do not create sessions for /_health
When the /_health endpoint for the docker container healthcheck was introduced, it seems that it was forgotten to exclude that route from the session creation. As the healthcheck runs quite periodically, this created a huge amount of session entries in the database. This commit excludes the route from session creation. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
5e2c766388
commit
307a634157
2 changed files with 2 additions and 1 deletions
2
app.js
2
app.js
|
@ -152,7 +152,7 @@ app.use('/uploads', express.static(path.resolve(__dirname, config.uploadsPath),
|
|||
app.use('/default.md', express.static(path.resolve(__dirname, config.defaultNotePath), { maxAge: config.staticCacheTime }))
|
||||
|
||||
// session
|
||||
app.use(useUnless(['/status', '/metrics'], session({
|
||||
app.use(useUnless(['/status', '/metrics', '/_health'], session({
|
||||
name: config.sessionName,
|
||||
secret: config.sessionSecret,
|
||||
resave: false, // don't save session if unmodified
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
### Bugfixes
|
||||
- Fix a crash when having numeric-only values in opengraph frontmatter
|
||||
- Fix unnecessary session creation on healthcheck endpoint
|
||||
|
||||
## <i class="fa fa-tag"></i> 1.9.9 <i class="fa fa-calendar-o"></i> 2023-07-30
|
||||
|
||||
|
|
Loading…
Reference in a new issue