CRM переехала на shotam.tvorymo.com: allowlist origin (CRM_ORIGINS) для postMessage и frame-ancestors, стили CRM от корня

This commit is contained in:
EugeneTes
2026-10-16 07:40:40 +00:00
parent f6b9f03ed7
commit ec2f094f48
5 changed files with 24 additions and 11 deletions

View File

@@ -5,8 +5,13 @@
Supabase `GET /auth/v1/user` (+ `exp`, `aud = authenticated`) и показывает имя/email/id.
- Node 22, без зависимостей: `server.js` + `public/index.html`.
- Заголовок `Content-Security-Policy: frame-ancestors *`, без `X-Frame-Options`.
- Env: `SUPABASE_URL`, `SUPABASE_PUBLISHABLE_KEY`, `PORT` (по умолчанию 3000).
- Разрешённые origin CRM — env `CRM_ORIGINS` (через запятую; по умолчанию
`https://shotam.tvorymo.com,https://units.tvorymo.com`). Используются в
`Content-Security-Policy: frame-ancestors …` (без `X-Frame-Options`) и как allowlist для `postMessage`:
сообщения от других origin игнорируются (пишется в журнал).
- Стили CRM берутся с `https://shotam.tvorymo.com/css/tvorymo-ui.css` и `/css/crm.css` (от корня;
старые пути `/tvorymo-crm/css/...` дают 404).
- Env: `SUPABASE_URL`, `SUPABASE_PUBLISHABLE_KEY`, `CRM_ORIGINS`, `PORT` (по умолчанию 3000).
- Деплой: Coolify (Dockerfile), домен `https://test-crm.tes.gd`.
Подробности — `SPEC.md`.