3 min read

Allowed origins

Each team key only works on the sites you list — exact origins, no paths, checked on every request.

A team key is public — it’s in your page’s HTML. The allowed origins list decides which sites may use it from a browser. Manage it in the portal under Setup → Embed.

Format

An origin is a scheme plus a host, with an optional port, and nothing else:

EntryValid?
https://app.example.comYes
http://localhost:5173Yes
https://example.com/appNo — no paths
app.example.comNo — include https://
*Yes — allows any site

Rules:

  • One origin per line. Trailing slashes are removed when you save.
  • Matching is exact apart from letter case: https://example.com doesn’t cover https://www.example.com or https://staging.example.com. List each one.
  • A team can have up to 50 origins.

Local development

Add your dev server’s origin, including the port — for example http://localhost:3000 or http://127.0.0.1:5173. localhost and 127.0.0.1 are different origins, so add the one you actually browse to. Consider a separate team for development so your production list stays short.

How it’s enforced

Every widget request from a browser carries an Origin header. For each request, app.teamshelf.ai:

  1. Answers CORS preflights only for allowed origins. Other origins get no Access-Control-Allow-Origin header, so the browser blocks the request.
  2. Rejects disallowed origins outright with 403:
JSON
{ "error": "Origin https://evil.example is not allowed for this team. Add it in the TeamShelf portal." }

The portal’s own origin is always allowed, so the Preview widget button in the portal works without adding anything.

What it doesn’t do

The allow-list is a browser control. It stops other websites from embedding your team, but it isn’t authentication: requests made outside a browser — from a script or a server — can omit the Origin header entirely. Treat your team key as public, and read Security before giving bots powerful tools.