server {
    listen       4200;
    server_name  localhost;

    location / {
        root   /usr/share/nginx/html;
        try_files $uri $uri/ /index.html =404;
    }

     # Serve runtime config with no cache
    location = /fleetbase.config.json {
        root /usr/share/nginx/html;
        default_type application/json;
        add_header Cache-Control "no-cache, no-store, must-revalidate";
        add_header Pragma "no-cache";
        add_header Expires 0;
        try_files /fleetbase.config.json @config_fallback;
    }

    location @config_fallback {
        return 200 '{}';
    }
}
