Укрепление эксплуатации: healthcheck'и, лимиты ресурсов, логи, self-hosted шрифты, smoke-проверка в CI
Deploy / deploy (push) Failing after 0s
Deploy / deploy (push) Failing after 0s
This commit is contained in:
+14
-1
@@ -13,10 +13,16 @@ server {
|
||||
# не светим точную версию nginx в заголовке Server и в error-страницах
|
||||
server_tokens off;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 256;
|
||||
gzip_comp_level 5;
|
||||
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
||||
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header X-Frame-Options DENY always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header Content-Security-Policy "default-src 'self'; connect-src 'self' wss://cactoz.su wss://www.cactoz.su; img-src 'self' data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; base-uri 'none'; frame-ancestors 'none'" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; connect-src 'self' wss://cactoz.su wss://www.cactoz.su; img-src 'self' data:; style-src 'self' 'unsafe-inline'; font-src 'self'; base-uri 'none'; frame-ancestors 'none'" always;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
@@ -28,6 +34,13 @@ server {
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# статичные ассеты меняются редко (лого, og-картинка, CV) — час кэша
|
||||
# компромисс между скоростью и актуальностью без хешей в именах
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=3600";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
limit_req zone=ws_connect burst=10 nodelay;
|
||||
limit_conn ws_conn 20;
|
||||
|
||||
Reference in New Issue
Block a user