ProxyBridge is a lightweight proxy server that securely relays HTTP requests between clients and backend services.
https://proxybridge.focket.app/api/relay/<your-api-path> ?webUrl=<your-frontend-origin> &baseApiUrl=<your-backend-base-url>
| Param | Required | Description |
|---|---|---|
webUrl |
Yes | Frontend origin used for CORS Access-Control-Allow-Origin and upstream Origin. |
baseApiUrl |
Yes | Backend base URL. The relay path is appended to this. |
acceptHeadersKey |
No | Comma-separated request header names to forward (e.g. authorization,x-tenant-id). |
| any other | No | Forwarded verbatim to the upstream API as query params. |
const PROXY = 'https://proxybridge.focket.app';
const WEB_URL = 'https://app.example.com';
const API_BASE = 'https://api.example.com';
const res = await fetch(
`${PROXY}/api/relay/users` +
`?webUrl=${encodeURIComponent(WEB_URL)}` +
`&baseApiUrl=${encodeURIComponent(API_BASE)}`
);
const data = await res.json();
const { data } = await axios.get(`${PROXY}/api/relay/orders`, {
params: {
webUrl: WEB_URL,
baseApiUrl: API_BASE,
acceptHeadersKey: 'authorization',
},
headers: {
Authorization: 'Bearer <token>',
},
});
const res = await fetch(
`${PROXY}/api/relay/users` +
`?webUrl=${encodeURIComponent(WEB_URL)}` +
`&baseApiUrl=${encodeURIComponent(API_BASE)}` +
`&acceptHeadersKey=authorization`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <token>',
},
body: JSON.stringify({ name: 'Ada', email: 'ada@example.com' }),
}
);
{
"success": true,
"statusCode": 200,
"message": "Successfully Retrieved!",
"data": { /* upstream data or full JSON */ },
"meta": null
}
webUrl or baseApiUrl → 400500)