add ru to nginx.conf and sw.js
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user