Backfire vs a raw fetch
Backfire compared with calling fetch() directly
Calling fetch() from your own code is not wrong: it is the fastest path and it has no per-call cost beyond your compute. The question is whether the URL is trusted, who owns the validation code, and what you can prove afterwards.
When each one wins
Choose a raw fetch() when the target is a fixed, hardcoded host inside a trusted network. Choose Backfire when the URL is influenced by a user, a model or a webhook payload, or when you need per-call evidence.
Lines of integration code
- The alternative
- About ten
- Backfire
- One POST
SSRF validation
- The alternative
- Yours to write and keep current
- Backfire
- Applied to every target
Key management and revocation
- The alternative
- Yours to build
- Backfire
- Dashboard, effective next request
Timeout enforcement
- The alternative
- Your runtime settings
- Backfire
- Clamped and enforced by the relay
Per-call audit record
- The alternative
- Add logging yourself
- Backfire
- Written automatically
Extra network hop
- The alternative
- None
- Backfire
- One
Cost
- The alternative
- Your compute only
- Backfire
- Prepaid trips
The same call, side by side
raw-fetch
// before: the URL decides where the request goes
const res = await fetch(userUrl); // redirects followed, no ceiling, no record
// after: the same call, with the key, the guard and the log attached
const envelope = await (await fetch('https://backfireapi.base44.app/functions/forward', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BACKFIRE_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: userUrl, method: 'GET', timeout_ms: 8000 }),
})).json();
if (!envelope.ok) throw new Error(envelope.error.code); // blocked_target, dns_failure, rate_limited
return envelope.body.json ?? envelope.body.text;Worth knowing
- A raw fetch() inside a private network can legitimately reach internal services. Backfire cannot, and will not try — that restriction is the product.
- The relay cannot know your business rules. An allow-list of hosts your product should call is still your job, and it is the strongest complement to the SSRF guard.
Limits that stay your problem either way
- The relay cannot know which hosts your product should call — an allow-list stays yours to write.
- One extra hop of latency, reported as duration_ms on the upstream leg so you can measure it.
- A request that reaches the network costs a trip even when the upstream answers 500; refusals are free.
- Redirect policy is still a decision you make in code — the relay returns 3xx rather than following it.
Questions about this
Other comparisons
Try it with 5,000 free trips.
No card, no subscription, and the balance never expires.

