# Proxy & Isolation _Path: en/frontend/web-host/proxy-isolation_ ## Table of Contents - Proxy & Isolation ## Content # Proxy & Isolation The Web Host runs each child micro-frontend in a sandboxed context and bridges it to the host through the **Proxy API**. Micro frontend apps and web components both reach the host by importing from **`@wippy-fe/proxy`**. ![Proxy API injection and nesting](../diagrams/proxy-layers.svg) ## The Proxy API The Proxy API is your entry point to the host. A runtime — `proxy.js` — delivers it: it puts the API and the current `AppConfig` on the page and exposes them through the **`@wippy-fe/proxy`** module. - For a **micro frontend app** (`view.page`), the host injects `proxy.js` into the page's `srcdoc`. - For a **web component** (`view.component`), the runtime is already present in the host page — the component mounts in the host DOM, not a separate iframe. Your code consumes it through the sync getters exported by `@wippy-fe/proxy`: ```ts import { host, api, on, config } from '@wippy-fe/proxy' host.navigate('/dashboard') const data = await api.get('/api/v1/agents') // api is an axios instance; the await is the HTTP call on('@history', ({ path }) => router.replace(path)) ``` These getters are **synchronous**: `host`, `api`, `on`, `config`, and the rest are ready the moment your code runs — config is in place before the runtime initializes (see below), so there is no handshake to await. Mark `@wippy-fe/proxy` as `external` in your Vite build — the host provides it through the import map. See [Proxy API](../micro-frontends/proxy-api.md) for the full surface. ## How config reaches an app iframe When the host loads a `view.page`, it builds a `srcdoc` and injects, **in order, before your app's script**: ```html ``` Because the config global is set **before** `proxy.js` runs, the runtime initializes synchronously and the `@wippy-fe/proxy` getters work immediately — no handshake. Pages don't reference these scripts directly; the `