mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	server-ts: Address review
This commit is contained in:
		| @@ -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'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user