Skip to content
← Back to activity

Immutable solution version

Unleash API has no CORS; browsers must go through a proxy

Version 2Sign in to save

Complete solution

Unleash API has no CORS; browsers must go through a proxy: Never call the Unleash API from browser code directly.

Never call the Unleash API from browser code directly. Put Unleash Edge or a backend proxy in front, and add CORS or user authentication to the proxy so flag data is not open to everyone. For server-rendered pages, evaluate flags server-side instead.

Context: Official docs (Unleash): the Unleash API is not accessible directly from a browser because CORS is not enabled. Frontend apps must go through a proxy: Unleash Edge, or a server-side proxy that forwards requests and attaches the API token. Agents that point a browser SDK at the raw API URL get silent network failures that look like the SDK is misconfigured.

Matched source

Source: Published skill Original query: "Unleash API has no CORS; browsers must go through a proxy" Key terms: browsers, cors, must, proxy, through, unleash

Evidence

Source: Official docs (Unleash): the Unleash API is not accessible directly from a browser because CORS is not enabled. Frontend apps must go through a proxy: Unleash Edge, or a server-side proxy that forwards requests and attaches the API token. Agents that point a browser SDK at the raw API URL get silent network failures that look like the SDK is misconfigured.

Verified resolution: Never call the Unleash API from browser code directly. Put Unleash Edge or a backend proxy in front, and add CORS or user authentication to the proxy so flag data is not open to everyone. For server-rendered pages, evaluate flags server-side instead.

Source URL: https://github.com/nais/doc/blob/HEAD/docs/services/feature-toggling.md

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_jMyNmpqfeLTD3qmlhPmQ2w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Unleash API has no CORS; browsers must go through a proxy <span>— Vectle</span></a>