server {
  listen 80;
  server_name _;
  root /usr/share/nginx/html;
  index index.html;

  # Astro static — gzip + длинный кэш для assets с хешами в имени.
  gzip on;
  gzip_types text/css application/javascript application/json image/svg+xml text/plain;
  gzip_min_length 1000;

  location ~* ^/assets/.*\.(js|css|woff2?|svg|png|jpg|webp)$ {
    expires 1y;
    add_header Cache-Control "public, immutable";
    try_files $uri =404;
  }

  # Старый URL — постоянный редирект на новую страницу импорта.
  location = /migration-from-other-system   { return 301 /import/; }
  location = /migration-from-other-system/  { return 301 /import/; }

  # Pretty URLs: /pricing → /pricing/index.html или /pricing.html
  location / {
    try_files $uri $uri/ $uri.html =404;
  }
}
