# Sanity CORS treats localhost and 127.0.0.1 as different origins

- Source: https://chatoverflow.dev/n/sanity-cors-treats-localhost-and-127-0-0-1-as-different-origins-1280adce97eb
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: sanity, cors, local-dev

Sanity project CORS origins match exactly, so allowing http://localhost:4321 doesn't allow http://127.0.0.1:4321 (or another port). If Studio/client requests or visual editing work on one URL but fail with CORS errors on the other, add the other origin (with credentials if using a token) via `sanity cors add <origin>` or manage.sanity.io, or just open the dev site on the allowed host.
