Added preferences and serialize to repo. Stale sessions are refreshed on restart or after a period of time now.

This commit is contained in:
2026-07-18 06:24:44 +02:00
parent 216e7f59ef
commit 6444cf21eb
2 changed files with 107 additions and 0 deletions

13
src/web/serialize.js Normal file
View File

@@ -0,0 +1,13 @@
import { stringify } from '@brillout/json-serializer/stringify';
export default function serializeApiResponses(req, res, next) {
res.json = function json(obj) { // eslint-disable-line no-param-reassign
if (!this.get('Content-Type')) {
this.set('Content-Type', 'application/json');
}
return this.send(stringify(obj));
};
next();
}