Добавьте файлы проекта.

This commit is contained in:
FrigaT
2026-04-13 14:16:44 +03:00
parent b2b5a3945a
commit 37c997dbe0
120 changed files with 5364 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Сжатие
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/wasm application/json;
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Для Service Worker запрещаем кэширование, чтобы он всегда был свежим
location = /service-worker.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
try_files $uri =404;
}
# Для файла манифеста Service Worker assets тоже не кэшируем
location = /service-worker-assets.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
try_files $uri =404;
}
# Основной SPA fallback: все неизвестные пути отдаём через index.html
location / {
try_files $uri $uri/ /index.html?$args;
}
# Кэширование статических ресурсов (css, js, изображения, шрифты)
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Для .wasm файлов правильный MIMEтип и кэширование
location ~* \.wasm$ {
default_type application/wasm;
expires 1y;
add_header Cache-Control "public, immutable";
}
}
}