Skip to content

Build your personal knowledge base with Trilium Notes

fix(csrf): set more secure cookieOptions settings

Panagiotis Papadopoulos5f605b3a9167
diff --git a/src/routes/csrf_protection.ts b/src/routes/csrf_protection.ts
index aadd021004..0c7968af8b 100644
--- a/src/routes/csrf_protection.ts
+++ b/src/routes/csrf_protection.ts
@@ -6,8 +6,8 @@ const doubleCsrfUtilities = doubleCsrf({
cookieOptions: {
path: "", // empty, so cookie is valid only for the current path
secure: false,
- sameSite: false,
- httpOnly: false
+ sameSite: "strict",
+ httpOnly: true
},
cookieName: "_csrf"
});