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

    # gzip
    gzip on;
    gzip_types text/plain text/css application/javascript application/json image/svg+xml;
    gzip_min_length 1024;

    # Astro „directory"-Format: /shop -> /shop/index.html
    location / {
        try_files $uri $uri/ $uri/index.html =404;
    }

    # Statische Assets lange cachen (gehashte Dateinamen)
    location /_astro/ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }
    location /product-images/ {
        expires 30d;
        add_header Cache-Control "public";
    }
}
