{
    default_sni localhost
}

127.0.0.1 localhost {
    @api {
        path /api/*
    }

    handle @api {
        uri strip_prefix /api
        reverse_proxy backend-1:8080 backend-2:8080 {
            lb_policy round_robin

            health_uri /
            health_interval 5s
            health_timeout 5s
        }
    }

    handle {
        reverse_proxy frontend:80
    }
}