# An explicit http://localhost disables automatic/internal TLS in local mode.
{$DOMAIN:http://localhost} {
    # Keep database administration on the private wizard/XML-RPC path.
    @database path /web/database /web/database/* /xmlrpc/db /xmlrpc/2/db /jsonrpc /jsonrpc/*
    respond @database 403

    @websocket path /websocket /websocket/*
    reverse_proxy @websocket odoo:8072
    # Caddy sets X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host,
    # ignores spoofed incoming values, and handles websocket Upgrade natively.
    reverse_proxy odoo:8069
}
