GuideReference
TrainingSupportCommunity

modify_​outgoing_​request_​header


Modify, add, remove, or pass along specific request headers going upstream towards the origin.

Depending on the type of action you want to perform, specify the corresponding standard header name, or a custom_​header_​name if the standard name is set to OTHER. The header_​value serves as a match condition when the action is DELETE or MODIFY, and the new_​header_​value applies when the action is ADD or MODIFY. Whole-text replacements apply when the action is MODIFY, and substitutions apply when set to REGEX.

See also modify​_incoming​_request​_header, modify​_incoming​_response​_header, and modify​_outgoing​_response​_header.

OptionTypeDescriptionRequires
actionenum

Either ADD or DELETE outgoing HTTP request headers, MODIFY their fixed values, or specify a REGEX pattern to transform them.

{"displayType":"enum","options":["ADD","DELETE","MODIFY","REGEX"],"tag":"select"}
ADD

Add the header.

DELETE

Delete the header.

MODIFY

Modify the header.

REGEX

Specify another header to modify.

standard_​add_​header_​nameenum

If the value of action is ADD, this specifies the name of the field to add.

action is ADD
{"displayType":"enum","options":["USER_AGENT","OTHER"],"tag":"select"}
{"if":{"attribute":"action","op":"eq","value":"ADD"}}
USER_​AGENT

The User-Agent header.

OTHER

Specify another header to add.

standard_​delete_​header_​nameenum

If the value of action is DELETE, this specifies the name of the field to remove.

action is DELETE
{"displayType":"enum","options":["PRAGMA","USER_AGENT","VIA","OTHER"],"tag":"select"}
{"if":{"attribute":"action","op":"eq","value":"DELETE"}}
PRAGMA

The Pragma header.

USER_​AGENT

The User-Agent header.

VIA

The Via header.

OTHER

Specify another header to remove.

standard_​modify_​header_​nameenum

If the value of action is MODIFY or REGEX, this specifies the name of the field to modify.

action is MODIFY
OR action is REGEX
{"displayType":"enum","options":["USER_AGENT","OTHER"],"tag":"select"}
{"if":{"op":"or","params":[{"attribute":"action","op":"eq","value":"MODIFY"},{"attribute":"action","op":"eq","value":"REGEX"}]}}
USER_​AGENT

The User-Agent header.

OTHER

Specify another header to modify.

custom_​header_​namestring (allows variables)

Specifies a custom field name that applies when the relevant standard header name is set to OTHER.

standard_​add_​header_​name is OTHER
OR standard_​delete_​header_​name is OTHER
OR standard_​modify_​header_​name is OTHER
{"displayType":"string","tag":"input","type":"text"}
{"if":{"op":"or","params":[{"attribute":"standardAddHeaderName","op":"eq","value":"OTHER"},{"attribute":"standardDeleteHeaderName","op":"eq","value":"OTHER"},{"attribute":"standardModifyHeaderName","op":"eq","value":"OTHER"}]}}
header_​valuestring (allows variables)

Specifies the new header value.

action is ADD
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"action","op":"eq","value":"ADD"}}
new_​header_​valuestring (allows variables)

Specifies an HTTP header replacement value.

action is MODIFY
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"action","op":"eq","value":"MODIFY"}}
regex_​header_​matchstring (allows variables)

Specifies a Perl-compatible regular expression to match within the header value.

action is REGEX
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"action","op":"eq","value":"REGEX"}}
regex_​header_​replacestring (allows variables)

Specifies text that replaces the regex_​header_​match pattern within the header value.

action is REGEX
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"action","op":"eq","value":"REGEX"}}
match_​multipleboolean

When enabled with the action set to REGEX, replaces all occurrences of the matched regular expression, otherwise only the first match if disabled.

action is REGEX
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"action","op":"eq","value":"REGEX"}}
avoid_​duplicate_​headersboolean

When enabled with the action set to MODIFY, prevents creation of more than one instance of a header.

action is MODIFY
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"action","op":"eq","value":"MODIFY"}}