From 3a0a59234dc45954fac087e3c9936018b26d8f35 Mon Sep 17 00:00:00 2001 From: Romain Lanz <2793951+RomainLanz@users.noreply.github.com> Date: Thu, 19 Oct 2023 06:10:34 +0200 Subject: [PATCH] fix(cookie): change default config (#81) --- stubs/config.stub | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stubs/config.stub b/stubs/config.stub index 5a20de4..6cc5644 100644 --- a/stubs/config.stub +++ b/stubs/config.stub @@ -2,6 +2,7 @@ exports({ to: app.configPath('session.ts') }) }}} import env from '#start/env' +import app from '@adonisjs/core/services/app'; import { defineConfig } from '@adonisjs/session' export default defineConfig({ @@ -30,7 +31,8 @@ export default defineConfig({ cookie: { path: '/', httpOnly: true, - sameSite: false, + secure: app.inProduction, + sameSite: 'lax', }, /**