Caddy Configuration

This is an example Caddy configuration for Bugsink. It assumes that Caddy is running on the same server as Bugsink, and that Bugsink is running on port 8000.

bugsink.example.com {

    # Match nginx: client_max_body_size 20M;
    request_body {
        max_size 20MB
    }

    # Reverse proxy to Gunicorn
    reverse_proxy 127.0.0.1:8000 {
        # Preserve original host
        header_up Host {host}

        # Equivalent to X-Real-IP
        header_up X-Real-IP {remote_host}

        # Equivalent to X-Forwarded-Proto
        header_up X-Forwarded-Proto {scheme}
    }

    # HSTS header
    header {
        Strict-Transport-Security "max-age=31536000; preload"
    }

    # Optional logging
    log {
        output file /var/log/caddy/bugsink.log
        format console
    }
}

To get a deeper understanding of the meaning of each of the headers and settings, please refer to the Reverse Proxy Headers guide.

This Guide was provided by GitHub user ptdev