Skip to content

Conversation

@CJackHwang
Copy link
Owner

Motivation

  • Ensure the WebUI is built as part of Vercel deployments so the static/admin assets are available on each deploy.
  • Prevent stale or mismatched admin UI assets and SPA index.html from being served by applying explicit cache semantics at both the application and edge.

Description

  • Add a Vercel build command bash scripts/build-webui.sh to vercel.json so Vercel runs the WebUI build during deployment.
  • Add Vercel headers rules in vercel.json to set Cache-Control: public, max-age=31536000, immutable for /admin/assets/(.*) and Cache-Control: no-store, must-revalidate for /admin/(.*) at the edge.
  • Update routes/home.py to return FileResponse with Cache-Control headers so assets/ files are served with long-term immutable caching and the SPA index.html (and other non-asset static files) are served with no-store, must-revalidate.

Testing

  • No automated tests were run for this change.

Codex Task

@vercel
Copy link

vercel bot commented Feb 4, 2026

Deployment failed with the following error:

If `rewrites`, `redirects`, `headers`, `cleanUrls` or `trailingSlash` are used, then `routes` cannot be present.

Learn More: https://vercel.link/mix-routing-props

@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment Feb 4, 2026 6:20am

@CJackHwang CJackHwang merged commit 2007e0c into main Feb 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant