server {
    listen 80;
    server_name _;

    root /usr/share/nginx/html;
    index admin.html;

    # Never cache config.js / html so runtime config updates take effect.
    location = /config.js { add_header Cache-Control "no-store"; try_files $uri =404; }
    location ~* \.html$    { add_header Cache-Control "no-store"; try_files $uri =404; }

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

    # Static assets: images/fonts can be cached, JS/CSS must revalidate.
    location ~* \.(?:jpg|jpeg|png|webp|svg|ico|woff2?)$ {
        expires 7d;
        add_header Cache-Control "public";
        try_files $uri =404;
    }
    location ~* \.(?:css|js)$ {
        add_header Cache-Control "no-cache";
        try_files $uri =404;
    }
}
