header_upstream name value
header_downstream name value
header_upstream name regex replacement
header_downstream name regex replacement
- (existing header_upstream doc)
- header_upstream can also be used with an extra argument, where the field name is name, the regular expression to match in it is regex, and the value to replace the match with is value. This option allows values within headers to be modified based on those values, can be specified multiple times for multiple headers and for multiple modifications of the same header. Capture groups are supported and substituted into the replacement (as $1, $2, etc.) and request placeholders can be used in the replacement. The regular expressions use Go's syntax described here.