From 03ecaf8603e67096c11e003178f439126cbccf22 Mon Sep 17 00:00:00 2001 From: xtotdam Date: Sat, 14 Mar 2026 14:26:22 +0300 Subject: [PATCH] add ru to nginx.conf and sw.js --- nginx.conf | 4 ++-- public/sw.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index 25615f2..2d63cd7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -27,7 +27,7 @@ http { index index.html; absolute_redirect off; - location ~ ^/(en|ar|be|da|de|es|fr|id|it|nl|pt|tr|vi|zh|zh-TW)(/.*)?$ { + location ~ ^/(en|ar|be|da|de|es|fr|id|it|nl|pt|ru|tr|vi|zh|zh-TW)(/.*)?$ { try_files $uri $uri/ $uri.html /$1/index.html /index.html; expires 5m; add_header Cache-Control "public, must-revalidate"; @@ -35,7 +35,7 @@ http { add_header Cross-Origin-Opener-Policy "same-origin" always; } - location ~ ^/(.+?)/(en|ar|be|da|de|es|fr|id|it|nl|pt|tr|vi|zh|zh-TW)(/.*)?$ { + location ~ ^/(.+?)/(en|ar|be|da|de|es|fr|id|it|nl|pt|ru|tr|vi|zh|zh-TW)(/.*)?$ { try_files $uri $uri/ $uri.html /$1/$2/index.html /$1/index.html /index.html; expires 5m; add_header Cache-Control "public, must-revalidate"; diff --git a/public/sw.js b/public/sw.js index 3956c8d..0ea3887 100644 --- a/public/sw.js +++ b/public/sw.js @@ -100,7 +100,9 @@ self.addEventListener('fetch', (event) => { isLocal && (url.pathname.endsWith('.html') || url.pathname === '/' || - /^\/(en|fr|es|de|zh|zh-TW|vi|tr|id|it|pt|nl|be)(\/|$)/.test(url.pathname)) + /^\/(en|fr|es|de|zh|zh-TW|vi|tr|id|it|pt|ru|nl|be)(\/|$)/.test( + url.pathname + )) ) { event.respondWith(networkFirstStrategy(event.request)); }