Headers
Set response headers per path with Netlify-style rules in orbitpush.json.
headers in orbitpush.json takes the shape of [[headers]] in Netlify’s netlify.toml, written as JSON. Each entry becomes one bunny.net edge rule.
"headers": [
{ "for": "/*", "values": { "X-Frame-Options": "DENY" } },
{ "for": "/assets/*", "values": { "Cache-Control": "public, max-age=31536000, immutable" } }
]
Fields
| Field | Notes |
|---|---|
for |
Path to match. * matches any characters, also inside a segment, such as /assets/*.css |
values |
Header names and values |
If several entries set the same header for a URL, the last entry wins, as on Netlify. Headers also apply to the 404 page, to redirects and to the index.html that SPA mode serves.
Unsupported entries print a warning and are skipped. They do not fail the deploy.
Compared with Netlify
Compared with Netlify’s custom headers, section by section:
| Netlify feature | orbitpush | Notes |
|---|---|---|
[[headers]] with for and values |
✅ | As JSON in orbitpush.json |
A _headers file |
❌ | Not read or uploaded; deploy warns. Copy its rules with migrate-netlify |
| Header names are case-insensitive | ✅ | Cache-Control and cache-control in one entry are joined with , , sent with the first spelling |
/* for every path |
✅ | |
Wildcards: * anywhere in a path, matching any characters |
✅ | /assets/*.js also matches /assets/lib/app.js, as on Netlify |
Placeholders: :name as a whole segment |
✅ | |
A wildcard and a placeholder in one segment (/t/:name*) |
❌ | Skipped with a warning; Netlify doesn’t support it either |
| Multi-value headers | ✅ | Write the values in one string, separated by , |
Most response headers, such as Content-Type, Cache-Control or Content-Security-Policy |
✅ | |
Set-Cookie |
✅ | Served as written |
Headers Netlify ignores: Accept-Ranges, Age, Allow, Alt-Svc, Connection, Content-Encoding, Content-Length, Content-Range, Date, Location, Server, Trailer, Transfer-Encoding, Upgrade |
✅ | Skipped with a warning, as are names starting with CDN-. bunny.net rejects several of them, which would fail the deploy |
| Headers on proxied URLs and functions | – | orbitpush has no proxies or functions |
| Headers per branch or deploy context | – | orbitpush has no deploy contexts |
| Cookies across subdomains only on your own domain | ⚠️ | b-cdn.net is not on the Public Suffix List, so other sites on b-cdn.net can set cookies for <name>.b-cdn.net. Use your own domain for anything that relies on cookies |
Basic authentication (Basic-Auth) |
❌ | Skipped with a warning, so the password is never sent as a header |
_headers files
A _headers file in the root of the output directory is neither read nor uploaded, so a site can keep it for Netlify. deploy warns about it, and until orbitpush.json has rules it suggests orbitpush migrate-netlify.
Each headers entry uses one of the pull zone’s edge rules. See the 50-rule limit.