Reverse Proxy Setup

Generate the proxy config that CapGo expects

This page generates reverse proxy configs for the simpler CapGo contract: the public host is already stored in CapGo, and the proxy just forwards traffic to a reachable CapGo upstream while preserving the public host header. The same host-preservation rule applies to project pages and regular domain-backed pages.

Current contract

Store the public domain in CapGo, then preserve that host through the proxy. For project pages this is usually custom_domain_host.

Inputs

Fill in the public domain users visit, a reachable CapGo upstream target, and the route mode used by the project example.

Important

The public domain must already be configured in CapGo. Prefer preserving Host: <public-domain> so the worker can match the correct project or domain record directly. If your proxy layer cannot preserve Host, forward X-Forwarded-Host: <public-domain> and X-Forwarded-Proto: <public-scheme> instead.

Good content URL

Legacy content URL to reject

Utility routes

    Required proxy behavior

    • Host: public host (preferred)
    • X-Forwarded-Host: public host (fallback)
    • X-Forwarded-Proto: public scheme
    • Proxy target: reachable CapGo upstream host

    Proxy configs

    Switch tabs to generate the config and setup notes for common reverse proxy stacks.

    Generated config

    Upstream worker checklist

      Smoke test commands

      curl