Skip to content

RequestConfig

The request section configures how Pavonis sends outbound requests to upstreams, including the outbound proxy, IP pool and request header modification.

Fields

FieldTypeDefaultDescription
proxystringnoneOutbound HTTP proxy address, e.g. http://127.0.0.1:7890. All upstream requests will go through this proxy
ip_poolIpPoolConfigsee belowIP pool config, see below
headerHeaderModificationConfigsee belowOutbound request header modification config, see below

IpPoolConfig (IP Pool)

Allows Pavonis to select outbound IP addresses from specified IPv6 subnets.

FieldTypeDefaultDescription
enabledboolfalseWhether to enable the IP pool. subnets must not be empty when enabled
default_strategyIpPoolStrategynoneDefault outbound IP selection strategy; can be overridden per site via ip_pool_strategy
subnets[]string[]CIDR subnet list for outbound IPs

Strategy enum values:

ValueDescription
noneDo not use the IP pool; use the system default outbound IP
randomRandomly select an IP from the pool for each request
ip_hashHash the client IP; the same client always uses the same outbound IP

HeaderModificationConfig (Request Headers)

Controls the headers sent with upstream requests.

FieldTypeDefaultDescription
modifymap[string]string{}Add or overwrite specified request headers
delete[]stringsee belowDelete specified request headers

Default headers removed by header.delete (prevents proxy information leaking to upstreams):

yaml
# Common reverse proxy headers
- 'Via'
- 'X-Forwarded-For'
- 'X-Forwarded-Proto'
- 'X-Forwarded-Host'
# Cloudflare-related headers
- 'CDN-Loop'
- 'CF-Connecting-IP'
- 'CF-Connecting-IPv6'
- 'CF-EW-Via'
- 'CF-IPCountry'
- 'CF-Pseudo-IPv4'
- 'Cf-Ray'
- 'CF-Visitor'
- 'Cf-Warp-Tag-Id'

WARNING

Explicitly configuring header.delete completely replaces the default list rather than appending to it. To keep the default removal behaviour and also delete additional headers, you must include the default list manually.

Configuration Examples

Use an Outbound Proxy

yaml
request:
  proxy: http://127.0.0.1:7890

Configure IP Pool (Random Strategy)

yaml
request:
  ip_pool:
    enabled: true
    default_strategy: random
    subnets:
      - '2001:db8::/48'

Configure IP Pool (Different Strategy per Site)

yaml
request:
  ip_pool:
    enabled: true
    default_strategy: none     # no IP pool by default
    subnets:
      - '2001:db8::/48'

sites:
  - host: docker.example.com
    mode: container_registry_single
    self_url: https://docker.example.com
    ip_pool_strategy: ip_hash  # this site uses ip_hash

Add Custom Request Headers to Upstream

yaml
request:
  header:
    modify:
      X-Custom-Header: 'my-value'
      Authorization: 'Bearer secret-token'

Customise the Delete Header List

yaml
request:
  header:
    delete:
      - 'Via'
      - 'X-Forwarded-For'
      - 'X-Forwarded-Proto'
      - 'X-Forwarded-Host'
      - 'CDN-Loop'
      - 'CF-Connecting-IP'
      - 'CF-Connecting-IPv6'
      - 'CF-EW-Via'
      - 'CF-IPCountry'
      - 'CF-Pseudo-IPv4'
      - 'Cf-Ray'
      - 'CF-Visitor'
      - 'Cf-Warp-Tag-Id'
      - 'X-My-Internal-Header'  # also remove this custom header