Skip to content

ResponseConfig

The response section configures how Pavonis processes upstream responses, including the maximum number of redirects to follow and response header modification.

Fields

FieldTypeDefaultDescription
max_redirectsint10Maximum number of redirects Pavonis will follow when redirect-following is required
headerHeaderModificationConfigsee belowResponse header modification config, see below

HeaderModificationConfig (Response Headers)

Controls the response headers returned to clients.

FieldTypeDefaultDescription
modifymap[string]string{}Add or overwrite specified response headers
delete[]string[]Delete specified response headers

Configuration Examples

Reduce Max Redirects

yaml
response:
  max_redirects: 3

Add CORS Headers

yaml
response:
  header:
    modify:
      Access-Control-Allow-Origin: '*'
      Access-Control-Allow-Methods: 'GET, HEAD'

Remove Specific Upstream Response Headers

yaml
response:
  header:
    delete:
      - 'X-Powered-By'
      - 'Server'