From 28da43ee607c77b09fe6d5409b763d82c5941fc9 Mon Sep 17 00:00:00 2001 From: goboss Date: Tue, 5 May 2026 13:20:00 +0000 Subject: [PATCH] =?UTF-8?q?RECOMMENDATIONS:=20D-canonical-archive=20?= =?UTF-8?q?=E2=80=94=2013=20sites=20canonical=20hardcoded=20/v/=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BC=D1=96=D1=81=D1=82=D1=8C=20archive=20URL;=20backend?= =?UTF-8?q?=20var.lua=20+=20kor=20reboot=20required=20(frontend-only=20fix?= =?UTF-8?q?=20=D0=BD=D0=B5=20reliable=20bo=20etlua=20=D0=BD=D0=B5=20=D0=BC?= =?UTF-8?q?=D0=B0=D1=94=20access=20=D0=B4=D0=BE=20ngx.var.uri)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/RECOMMENDATIONS.md | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/RECOMMENDATIONS.md b/docs/RECOMMENDATIONS.md index 330fc66..6f0823e 100644 --- a/docs/RECOMMENDATIONS.md +++ b/docs/RECOMMENDATIONS.md @@ -281,3 +281,54 @@ Items з статусом `DONE`, `WONTFIX`, `DEFERRED` переходять у *Last update: 2026-05-01 (W1-W3 workflow + D1-D4 doc items added).* *Initial backlog: 2026-04-30 (gocc1+2+3+4 audits).* + +## D-canonical-archive — Canonical points to `/v/` instead of archive URL pattern (13 sites) + +**Зона:** Backend (admin/dev) — потребує kor reboot. + +**Symptom:** На archive routes (`/v/arch/`, `/v-cache/`, `/v/stored/`, etc. per CSV new-url-pattern) canonical link генерується як `/v//...` (standard) замість archive URL. Robots `noindex,follow` правильно set, але canonical не reflects archive. + +**Root cause:** `views/id_index.etlua` line ~90 hardcodes `/v/` у canonical generation. Frontend не має access до runtime URL (`ngx.var.uri` not accessible у etlua context, `mysettings.cur_uri` not set). + +**Reference (8161 has partial setup):** +- `var.archive_video_dir = "/v-arch/"` +- `var.canonical_without_archive = 1` — explicit strip → canonical = standard `/v/` (BY DESIGN для 8161) +- `app.lua` line 2408-2409 використовує `archive_video_dir` для URL formation + +**Fix per site (13 sites — крім 8161 яке by design strip):** + +```lua +-- lib//var.lua +var.archive_video_dir = "" -- e.g. "/v/arch/" для 8159 +var.canonical_without_archive = 0 -- canonical KEEPS archive prefix +var.nofollow_on_archive = 1 -- if not already +``` + +Per CSV `new-url-pattern` column: +| Port | new-url-pattern | +|------|-----------------| +| 8159 | /v/arch/ | +| 8163 | /v-cache/ | +| 8158 | /v/stored/ | +| 8151 | /v/old/ | +| 8160 | /v/storage/ | +| 8153 | /v/archive/ | +| 8154 | /v/unlisted/ | +| 8155 | /v/shelved/ | +| 8156 | /v/disabled/ | +| 8157 | /v/bin/ | +| 8162 | /v-storage/ | +| 8150 | /video/old/ | +| 8152 | /v/parked/ | + +Plus `subrouter.lua` route registration якщо missing — verify each site handles archive route. + +**Verify post-deploy:** +```bash +curl -sL "https://www.//" | grep -oE 'rel="canonical" href="[^"]+"' +# Expected: href="https://www.//" (canonical=archive URL) +``` + +**Frontend template** (`id_index.etlua`) можливо потребує adjustment коли backend exposes `mysettings.cur_archive_path` чи similar — depending on app.lua implementation. + +Reported 2026-05-05 by user audit на 8159 → bug confirmed на ВСІХ 13 sites with archive routing setup.