Deployment
Deployment Configuration
Configure headers, ports, public paths, and server bytecode behavior through rbssr.config.ts.
configheadersbytecode
rbssr.config.ts is the operational control surface for the framework.
Example
import { defineConfig } from "react-bun-ssr";
export default defineConfig({
port: 3000,
headers: [
{
source: "/api/**",
headers: {
"x-frame-options": "DENY",
},
},
],
serverBytecode: true,
});
Important settings
headersfor path-based response headersserverBytecodeto enable or disable Bun bytecode for server bundlesmode,port, and directory overrides
Cache policy defaults
Production static assets receive cache headers automatically. User header rules override framework defaults.
Set a header value to null when you want to remove a framework default for a specific path, such as dropping cache-control from /sitemap.xml.
Related APIs
Next step
Use Troubleshooting when a deploy does not behave like local validation.