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 7d3d4da5ba
6 changed files with 13 additions and 5 deletions
+7
View File
@@ -2,6 +2,12 @@
Формат основан на [Keep a Changelog](https://keepachangelog.com/ru/1.1.0/), версии — [SemVer](https://semver.org/lang/ru/).
## [1.0.7] — 2026-09-17
### CMS
- Вход в админку по HTTP снова сохраняет сессию: Secure-cookie больше не ставится без HTTPS
## [1.0.6] — 2026-09-17
### Сайт
@@ -64,6 +70,7 @@
- Docker Compose для локальной БД
- Секреты и логины в git не входят
[1.0.7]: https://git.myunion.pro/Alex/Moniki_uslugi/src/tag/v1.0.7
[1.0.6]: https://git.myunion.pro/Alex/Moniki_uslugi/src/tag/v1.0.6
[1.0.5]: https://git.myunion.pro/Alex/Moniki_uslugi/src/tag/v1.0.5
[1.0.4]: https://git.myunion.pro/Alex/Moniki_uslugi/src/tag/v1.0.4
+1 -1
View File
@@ -4,7 +4,7 @@
Репозиторий: [Moniki_uslugi](https://git.myunion.pro/Alex/Moniki_uslugi) на [git.myunion.pro](https://git.myunion.pro/).
Текущая версия: **v1.0.6** (см. [CHANGELOG.md](CHANGELOG.md)).
Текущая версия: **v1.0.7** (см. [CHANGELOG.md](CHANGELOG.md)).
## Что внутри
+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",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "moniki-platnye-uslugi",
"version": "1.0.6",
"version": "1.0.7",
"private": true,
"scripts": {
"dev": "pnpm -r --parallel dev",