ContributingWeb client
The dev proxy
Vite sends three paths to ferryd. Thus the browser gets the app and the API from one origin.
The browser asks Vite for the app. Vite answers from web/src.
1 / 4
Where each request goes
| Path | Goes to |
|---|---|
/api, /hooks, /healthz | FERRY_API_URL. The default is http://127.0.0.1:7878. |
| Each other path | The app, from Vite |
What the proxy keeps
- The host. The proxy sends the host that the browser used in the header
X-Forwarded-Host.ferrydcompares it with theOriginof each request that has the session cookie. - The streams. Server-Sent Events pass through the proxy with no buffer and no compression. The log streams and the change feed use them.
npm run preview uses the same proxy on port 4173.