mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
server-ts: Address review
This commit is contained in:
parent
ae29699e65
commit
0d700d6951
@ -70,14 +70,13 @@ import etapiNoteRoutes = require('../etapi/notes');
|
|||||||
import etapiSpecialNoteRoutes = require('../etapi/special_notes');
|
import etapiSpecialNoteRoutes = require('../etapi/special_notes');
|
||||||
import etapiSpecRoute = require('../etapi/spec');
|
import etapiSpecRoute = require('../etapi/spec');
|
||||||
import etapiBackupRoute = require('../etapi/backup');
|
import etapiBackupRoute = require('../etapi/backup');
|
||||||
import { RequestHandlerParams } from 'express-serve-static-core';
|
|
||||||
import { AppRequest, AppRequestHandler } from './route-interface';
|
import { AppRequest, AppRequestHandler } from './route-interface';
|
||||||
|
|
||||||
const csrfMiddleware = csurf({
|
const csrfMiddleware = csurf({
|
||||||
cookie: true,
|
cookie: {
|
||||||
path: '' // empty, so cookie is valid only for the current path
|
path: "" // empty, so cookie is valid only for the current path
|
||||||
// TODO: Typescript complains that path does not exist in csurf options, but it's still in the
|
}
|
||||||
} as any);
|
});
|
||||||
|
|
||||||
const MAX_ALLOWED_FILE_SIZE_MB = 250;
|
const MAX_ALLOWED_FILE_SIZE_MB = 250;
|
||||||
const GET = 'get', PST = 'post', PUT = 'put', PATCH = 'patch', DEL = 'delete';
|
const GET = 'get', PST = 'post', PUT = 'put', PATCH = 'patch', DEL = 'delete';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user