Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Add SameSite to auth cookie.

Mike Cao343e59e6ff0b
diff --git a/package.json b/package.json
index dc2c4b8a6..32369d718 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "umami",
- "version": "0.10.3",
+ "version": "0.10.4",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
diff --git a/pages/api/auth/login.js b/pages/api/auth/login.js
index ce9474aa7..6ab826df2 100644
--- a/pages/api/auth/login.js
+++ b/pages/api/auth/login.js
@@ -15,6 +15,7 @@ export default async (req, res) => {
const cookie = serialize(AUTH_COOKIE_NAME, token, {
path: '/',
httpOnly: true,
+ sameSite: true,
maxAge: 60 * 60 * 24 * 365,
});