itube-specs 0.0.1067 → 0.0.1069

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SITE_UPDATES.md CHANGED
@@ -11,6 +11,13 @@
11
11
  коммиты до бампа); `npm run patch` сам проставит ей номер версии. Формат пункта: что сделать и где,
12
12
  кому именно (всем / сайтам с N), что будет, если не сделать.
13
13
 
14
+ ## 0.0.1068 — 2026-11-03
15
+
16
+ - **Всем — решить флаг:** верификация возраста (редирект на agerify, пока не пройдена) снова работает, за флагом
17
+ `FeatureAgeVerificationEnabled`. Список стран общий, в слое (`runtime/utils/server/age.ts`); сейчас для проверки
18
+ только `NL` (GB и штат KS временно сняты). Хотите проверку — добавьте `FeatureAgeVerificationEnabled: true` в
19
+ `config/feature-flags.config.ts` (gay-cool-new включил). Без флага ничего не меняется.
20
+
14
21
  ## 0.0.1067 — 2026-11-03
15
22
 
16
23
  - **hdsex-remaster, videosection-redesign — удалить оверрайды FapHouse, иначе блок под плеером будет ДВАЖДЫ:**
@@ -1,25 +1,21 @@
1
- // Возрастная верификация: СЕЙЧАС ОТКЛЮЧЕНА (middleware сразу возвращает return).
2
- // Логика проверки гео + статуса верификации с редиректом на форму сохранена ниже
3
- // в закомментированном виде — раскомментировать при включении.
4
- // import { isGeoMatch, getAgeValidationUrl, isAgeVerified } from '../runtime';
5
- // import { navigateTo } from '#app';
1
+ import { isGeoMatch, getAgeValidationUrl, isAgeVerified } from '../runtime';
6
2
 
7
- export default defineNuxtRouteMiddleware(async (_to) => {
8
- return;
9
- // if (!import.meta.server) return;
10
- // if (to.path.startsWith('/bff/age/verify')) return;
11
- //
12
- // const event = useRequestEvent();
13
- //
14
- // const config = useRuntimeConfig();
15
- // if (!(await isGeoMatch(event, config))) return;
16
- //
17
- // const verified = await isAgeVerified(event, config);
18
- //
19
- // if (!verified) {
20
- // const { url } = await getAgeValidationUrl(event, to.path, config);
21
- // if (url) {
22
- // return navigateTo(url, { external: true });
23
- // }
24
- // }
3
+ export default defineNuxtRouteMiddleware(async (to) => {
4
+ if (!import.meta.server) return;
5
+ if (to.path.startsWith('/bff/age/verify')) return;
6
+
7
+ const config = useRuntimeConfig();
8
+ if (!config.public.featureFlags?.FeatureAgeVerificationEnabled) return;
9
+
10
+ const event = useRequestEvent();
11
+ if (!(await isGeoMatch(event, config))) return;
12
+
13
+ const verified = await isAgeVerified(event, config);
14
+
15
+ if (!verified) {
16
+ const { url } = await getAgeValidationUrl(event, to.path, config);
17
+ if (url) {
18
+ return navigateTo(url, { external: true });
19
+ }
20
+ }
25
21
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.1067",
4
+ "version": "0.0.1069",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
@@ -1,10 +1,10 @@
1
1
  import { getCookie } from 'h3';
2
2
  import { getClientHeaders } from './get-client-headers';
3
3
 
4
- /** Возвращает true если пользователь находится в регионе где требуется верификация возраста (GB, штат KS). */
4
+ /** Возвращает true если пользователь находится в регионе где требуется верификация возраста. */
5
5
  export async function isGeoMatch(event, _config) {
6
- const AGE_VERIFY_REGIONS = ['KS'];
7
- const AGE_VERIFY_COUNTRIES = ['GB'];
6
+ const AGE_VERIFY_REGIONS: string[] = [];
7
+ const AGE_VERIFY_COUNTRIES = ['NL'];
8
8
 
9
9
  const headers = getClientHeaders(event);
10
10
  const countryCode = headers[ 'countryCode' ];
@@ -26,7 +26,6 @@ export async function isAgeVerified(event, config) {
26
26
  },
27
27
  headers: {
28
28
  'x-domain': config.public.xDomain,
29
- 'X-Cache-Time': 259200,
30
29
  'Content-Type': 'application/json',
31
30
  },
32
31
  parseResponse: JSON.parse
@@ -67,7 +66,6 @@ export async function getAgeValidationUrl(event, backPath: string, config) {
67
66
  },
68
67
  headers: {
69
68
  'x-domain': config.public.xDomain,
70
- 'X-Cache-Time': 259200,
71
69
  'Content-Type': 'application/json',
72
70
  },
73
71
  });