PreiseGitHubDashboard

Platform errors

Origin allowlist blocked (403)

When an endpoint has a non-empty list of allowed origins, the gateway accepts browser requests only from listed sites. A request that carries an Origin header from anywhere else receives HTTP 403 before RPS checks and upstream forwarding. Calls without an Origin header (servers, curl) are not affected.

HTTP 403-32000WS 1008

← Alle Fehler

Beispielantwort

Beispiel

HTTP/1.1 403 Forbidden
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": null,
  "error": {
    "code": -32000,
    "message": "origin https://other.example is not allowed for this endpoint"
  }
}

Ursachen

  • The list is non-empty and the page that makes the call is served from an origin that is not in it (another domain, http instead of https, a different port, www versus bare domain).
  • A wildcard entry such as https://*.example.com does not cover example.com itself, and it only matches the same scheme and port.
  • The page runs in a sandboxed iframe or from file://, so the browser sends Origin: null.
  • A staging or preview deployment on a new domain was not added.

Lösung

  • In the dashboard → Endpoints → Settings (or PUT /v1/endpoints/{uuid}/allowed-origins), add the exact origin: https://app.example.com, or https://*.example.com for every subdomain. No path, at most 20 entries.
  • Add http://localhost:3000 (with your dev port) for local development, or use a separate endpoint without a list.
  • Clear the list and save if you no longer need the restriction.

Hinweise

  • An empty list allows every origin. The check only applies to requests with an Origin header; it keeps your endpoint key from being used on other sites, but it is not authentication, since a non-browser client can send any Origin.
  • For an endpoint with a list the gateway answers allowed origins with Access-Control-Allow-Origin and handles the OPTIONS preflight itself. WebSocket connections from a refused origin are closed with code 1008.