Allow admin session cookies on HTTP so Payload login works without HTTPS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alexey Novikov
2026-09-17 01:03:22 +03:00
co-authored by Cursor
parent d6b7723113
commit 4dbfe782f5
6 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@moniki/cms",
"version": "1.0.6",
"version": "1.0.7",
"private": true,
"type": "module",
"scripts": {
+2 -1
View File
@@ -8,7 +8,8 @@ export const Users: CollectionConfig = {
tokenExpiration: 60 * 60 * 24 * 7,
cookies: {
sameSite: 'Lax',
secure: process.env.NODE_ENV === 'production',
// HTTP admin (IP:3001) cannot store Secure cookies; enable only on HTTPS.
secure: (process.env.NEXT_PUBLIC_SERVER_URL || '').startsWith('https://'),
},
},
admin: {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@moniki/web",
"version": "1.0.6",
"version": "1.0.7",
"private": true,
"scripts": {
"dev": "next dev -p 3000",