feat(preview): static HTML mockups на /preview/* (basic auth) #268
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#268
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/preview-mockups-static"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Размещает 4 HTML макета-альтернативы (из audit сессии) на
https://gendsgn.ru/preview/под basic auth. Не трогает существующие React-страницы Next.js.Файлы
Изменения
preview/— 4 static HTML файла (~160 KB total)Caddyfile—handle_path /preview/* { root /srv/preview ; basicauth ; file_server browse }внутриgendsgn.rublockdocker-compose.prod.yml— bind mount./preview:/srv/preview:roв caddyAuth
previewБезопасность / scope
/,/site-finder,/analyticsпродолжают рендерить Next.js/preview/*— handle_path strip prefix, root указан явноTest plan
curl -i https://gendsgn.ru/preview/landing.html→ 401 Unauthorizedcurl https://gendsgn.ru/→ Next.js landing (не сломалось)curl -X POST https://gendsgn.ru/api/v1/health→ backend OKDeep review — verdict: APPROVE
Caddyfile (10 lines):
handle_path /preview/*корректно расположен ВНУТРИgendsgn.rublock, ПЕРЕД catch-allhandle { reverse_proxy frontend }— first-match wins, порядок правильный.handle_pathstrip prefix:/preview/landing.html→landing.html→/srv/preview/landing.html✓root * /srv/preview— корректный Caddy v2 синтаксис с*matcher.basicauth { user hash }block — валидный v2 syntax (без deprecatedbasicauth /path/*).$2a$14$...— валидный prefix, cost 14 (strong).:80block не экспонирует/preview/*— preview только через HTTPS apex domain. Good.docker-compose.prod.yml:
./preview:/srv/preview:roотносителен к/opt/gendesign/docker-compose.prod.yml.deploy.ymlделаетgit reset --hard origin/main→preview/синхронизируется. ✓:roправильно для static content.HTML files:
<script>тэгов во всех 4 файлах — нет JS, нет fetch к API, нет state mutation risk.fonts.googleapis.com,fonts.gstatic.com) +t.me/gendsgnв landing — приемлемо.Deploy flow:
.forgejo/workflows/deploy.ymltrigger paths включаетCaddyfile+docker-compose.prod.yml→ этот PR редеплоит. ✓caddy reloadзапускается автоматически послеcompose up -d(line 252-253). ✓preview/**— будущие правки только HTML (без Caddyfile/compose) не редеплоят. Bind mount:roподхватит файлы после следующего deploy с другим trigger, либо нуженworkflow_dispatch. Можно отдельным chore добавитьpreview/**в paths.Smoke checks после deploy (рекомендую):
Recommendations (non-blocking, отдельный chore):
preview/**вdeploy.ymlpaths:filter (чтобы HTML-only правки редеплоили).robots.txtexclude/preview/*— bcrypt 401 защищает от индексации, но disallow safer.browseизfile_server(directory listing не нужен — все entry points известны).Мержу как
mergestyle.