Deployment
Deployment Configuration for Bun React SSR Apps
Configure react-bun-ssr deployment settings for headers, ports, public paths, server bytecode behavior, and Bun production runtime defaults.
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.