ReferenceDeployment
Edit this page

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

  • headers for path-based response headers
  • serverBytecode to enable or disable Bun bytecode for server bundles
  • mode, 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.

Next step

Use Troubleshooting when a deploy does not behave like local validation.