Modify Outgoing Request Header

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

Why you need it

Use this behavior to decide how selected request headers going upstream towards the origin should be processed. For example, you can add headers such as User-Agent to inform the server about the user's browser, or use custom headers to control authorization. By controlling the content of your headers you can further customize your website visitor's experience and gain insight into how they use it.

How it works

When enabled, this behavior modifies the specified outgoing request header according to set rules.

Features and options

Field

What it does

Sub-options

Action

Specifies the action to perform on the header.

  • **Add**
  • **Remove**
  • **Modify**. This option replaces the entire value of the header.
  • **Find & Replace**. This option searches for a pattern in the header values and substitutes a pattern you specify.

Select Header Name

Select from standard pre-defined headers to modify.

With Action set to Add, Modify or Find & Replace.

  • User-Agent
  • Other...

With Action set to Remove.

  • Pragma
  • User-Agent
  • Via
  • Other...

Header Value

With Action set to Add, enter your HTTP header value.

Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete. Learn more about variable support.

Custom Header Name

With Select Header Name set to Other..., enter a custom HTTP header name.

Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete. Learn more about variable support.

New Header Value

With Action set to Modify, enter your new HTTP header value.

Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete. Learn more about variable support.

Avoid Duplicate Headers

With Action set to Modify, prevents multiple headers with the same name from being created.

Find What

With Action set to Find & Replace, finds a string matching the string you enter.

Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete. Learn more about variable support.

Replace With

With Action set to Find & Replace, replaces the matched string with the string you enter.

Variable Support: This option supports variable expression syntax. Typing {{ in the option field triggers variable auto complete. Learn more about variable support.

Occurrences

With Action set to Find & Replace, replaces only the first instance of the old value, or replaces every occurrence.

  • All
  • First occurrence only


Did this page help you?