# Replace seller.mirwal.pk below with the real domain before deploying.
server {
    listen 80;
    server_name seller.mirwal.pk;
    root /usr/share/nginx/html/seller;
    index index.html;

    # Belt and braces: apps/seller/index.html already carries a noindex meta
    # tag, but a header survives proxies and caches that a <meta> tag does
    # not. Staff panels have no business in a search index.
    add_header X-Robots-Tag "noindex, nofollow, noarchive" always;

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

    location /assets/ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }

    # See storefront.conf: product/store images are relative /media/... paths
    # that must resolve against the api container, not against this origin.
    location /media/ {
        proxy_pass http://api:4000;
        proxy_set_header Host $host;
    }

    location / {
        try_files $uri $uri/ /index.html;
    }
}
