SettingsReplace the ingestion origin allowlist

Replace the ingestion origin allowlist

Replace the location's allowed origins with the supplied list. Requires an agency key (ak_) and ?location_id=; viewer keys get 403 agency_required.

Each entry is normalized to a bare, lowercase hostname: full URLs, host:port, a leading *., and trailing dots are all accepted and reduced to the host. Entries must be valid hostnames with at least one dot (so localhost or a bare label is rejected); up to 50 are allowed. Duplicates are removed. Send an empty array to turn enforcement off.

Enforcement semantics once the list is non-empty:

  • Applies only to browser ingestion (/e). Server-side ingestion (/ingest with a Bearer key) is never restricted.
  • A bare domain covers its subdomains: acme.com matches acme.com and app.acme.com, but not notacme.com or acme.com.evil.com.
  • Lenient on a missing origin: a request that sends no Origin or Referer (server calls, sendBeacon, privacy tools) is allowed through. Only a present host that isn't covered is rejected (403 origin not allowed from /e).
  • Origin/Referer are spoofable by a non-browser client, so this stops casual snippet reuse, not a determined attacker. To disable a key entirely, deactivate the location.

Changes take effect within about a minute (the edge config cache TTL).

curl -X PUT "https://mythic-analytics.gulp.workers.dev/client/v1/settings/allowed-origins" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "allowed_origins": [
    "acme.com",
    "shop.acme.com"
  ]
}'
{
  "success": true,
  "data": {
    "allowed_origins": [
      "acme.com",
      "shop.acme.com"
    ]
  }
}
PUT
/allowed-origins
PUT
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.

Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Content-Typestring
Required

The media type of the request body

Options: application/json
allowed_originsarray
Required

Bare hostnames to allow (subdomains included). Empty array turns enforcement off.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.

Body

application/json
allowed_originsarray
Required

Bare hostnames to allow (subdomains included). Empty array turns enforcement off.

Example:
["acme.com","shop.acme.com"]

Responses

successboolean
dataobject