When you need it
You need an entry whenever something of yours runs on a different domain from the API:- a storefront at
https://www.mystore.comcalling an API athttps://api.mystore.com - the admin dashboard hosted separately from Spree, for instance on a CDN
- a mobile web app or a checkout widget embedded in another site
Adding one
Click Add allowed origin and enter the address exactly as the browser sees it — scheme and host, such ashttps://www.mystore.com. No path, and the scheme matters: http:// and https:// are different origins.
For local development, http://localhost matches any port, so one entry covers localhost:3000, localhost:4000 and so on.
What else it protects
Allowed origins also guard the links your store puts in emails. When a storefront asks for a password-reset or newsletter-confirmation email and says where the link should point, that address must be on this list — otherwise the link is dropped rather than sent. That stops a forged request from pointing your customers at a site you do not control.Related
- API Keys — a publishable key still needs its origin allowed to work from a browser
- Deploying the dashboard — the cross-origin setup in full

