Skip to content

Triple Nested Directives #723

@samyules

Description

@samyules

I'm trying to reverse proxy Netbird. It requires gRPC streaming to the backend on port 443. I need to set this global option to allow gRPC to port 443:

{
  servers {
    protocol {
      allow_h2c
    }
  }
}

I cannot figure out how use labels that will parse correctly. I tried caddy.servers.protocol: allow_h2c, but that produces:

{
  servers {
    protocol allow_h2c
  }
}

I also attempted caddy.servers.protocol.allow_h2c: but that resulted in an error. I cannot find any examples in the README that would produce a triple nested directive. Without this directive set, caddy gives the following error:

parsing upstream 'h2c://netbird-management:443': upstream address has conflicting scheme (h2c://) and port (:443, the HTTPS port), at Caddyfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions