Glozr docs

Embed the widget

Allowed origins

The widget bundle at /widget/widget.js is intentionally public — anyone can fetch it. Allowed origins is the trust boundary that stops a third party from dropping your snippet on a site you don't control.

Why it matters

Without an origin check, anyone who reads your HTML could copy the snippet, paste it on their own domain, and consume your conversation quota or impersonate your brand. The agent's allowed_origins list is what blocks that.

The three rules

  1. Empty list = deny everywhere. A freshly created agent serves no traffic until you add at least one origin.
  2. Wildcard "*" = allow everywhere. Reserved for internal demos and staging — don't ship this to production.
  3. Otherwise, exact scheme://host match. No regex, no glob, no subdomain inference.

Subdomains are not inferred

Listing https://example.com does not authorize https://app.example.com. Each subdomain has to be added explicitly. This prevents an attacker who controls a forgotten subdomain from inheriting trust from the apex.

Valid entries:

  • https://example.com
  • https://app.example.com
  • http://localhost:3000

Invalid entries (rejected by the form):

  • example.com — no scheme
  • *.example.com — wildcard subdomain
  • https://example.com/landing — path included

Enforcement on every call

The origin isn't validated only at boot. Every privileged endpoint — message send, lead capture, human takeover handoff, citation fetch — re-checks the request's Origin header against the agent's allow list. That way an exfiltrated JWT can't be replayed from somewhere else.

Managing the list

Edit origins from the agent's Settings → Security tab. One entry per line, full scheme://host (and optional port). Save publishes a new agent version; the widget picks it up on the next init.

Restricted paths

For finer control inside an allowed origin, use restricted_paths to block specific URL patterns — typically admin consoles or checkout flows where you don't want a chat overlay. The widget refuses to render on those paths even when the origin is otherwise allowed.

Note. Local development URLs like http://localhost:3000 are first-class — add them to test the agent before going live, and remove them when you ship.