Sanity
Running Sanity next to a website: deploying the Studio, fixing CORS errors, and how our Next.js + Sanity templates are set up.
- How to deploy Sanity Studio (hosted or self-hosted)npx sanity deploy puts the Studio on *.sanity.studio for free. Set studioHost for unattended deploys, use a deploy token in CI, or host it yourself.
- Fix Sanity CORS errors: add the right originAdd the exact origin (scheme, host, port) under API, CORS origins, with credentials where someone logs in. Why it can still fail after you added it.