orbitlab.json file to your repository to control how requests to your app are handled—redirects, rewrites, custom headers, trailing-slash behavior, and clean URLs. These rules run at the edge (in front of your app), so they apply before a request ever reaches your container.
The file is parsed automatically on every deployment. There is nothing to enable.
Where the file lives
Placeorbitlab.json at the root of your project. In a monorepo, put it in the same folder you set as your Root Directory (e.g. apps/web/orbitlab.json).
Only the routing keys below are read—any other keys are ignored, so you can safely keep unrelated settings in the same file.
A minimal example
Redirects
Send visitors from one path to another with an HTTP redirect.Rewrites
Serve content from a different path or another origin without changing the URL in the browser.- Internal rewrite — when
destinationis an absolute path (e.g./posts/:path*), the URL is rewritten and the request continues to your app. - Proxy rewrite — when
destinationis a full URL (e.g.https://api.example.com/:path*), the request is proxied to that origin. The upstreamHostheader is set to the destination host, and HTTPS upstreams are supported.
Headers
Attach custom response headers to matching requests. Header rules do not stop the request—after headers are set, it continues on to rewrites and your app.Trailing slash & clean URLs
trailingSlash—falsestrips the trailing slash (/about/→/about);trueenforces one (/about→/about/) for paths without a file extension. Both use a308redirect. The root/is never affected.cleanUrls— redirects/page.html→/pagewith a308.
Source patterns
Thesource field supports a familiar path-matching syntax:
Named parameters can be reused in
destination by writing the same :param token. For example, "/old/:slug" → "/new/:slug" carries the captured segment across.
Conditions (has / missing)
Both redirects, rewrites, and headers accept optionalhas and missing arrays to match only when certain request attributes are present (has) or absent (missing).
Per-domain (host) rules
When your service has several domains attached, use ahost condition to apply a rule to only one of them. This lets a single app serve different content per subdomain:
orbitlab.json routes within a single service. Host conditions differentiate between domains that are already attached to this service—they can’t send traffic to a different service. To point a domain at a specific service, attach it to that service from the dashboard (see Domains). To reach an external origin, use a rewrite whose destination is a full URL.Order of evaluation
Rules are applied at the edge in this order, then the request falls through to your app:cleanUrlstrailingSlashredirectsheadersrewrites- Your application
Managing rules from the dashboard
You can also manage routing from the dashboard/API. When both exist, the dashboard configuration takes precedence over the file: rule lists are combined with dashboard rules matched first, and the flags (trailingSlash, cleanUrls) use the dashboard value when set. Removing orbitlab.json from your repo clears the file-based rules on the next deploy, while dashboard rules stay in place.
Limits
To keep edge routing fast, the following limits apply:
If
orbitlab.json is invalid, the deploy continues and the previous routing rules are kept—check your build logs for a validation warning.