class Fastly::Header

customize headers. Best used with conditions.

Attributes

action[RW]

Action to perform on the header. Can be:

  • 'set' - Sets (or resets) a header

  • 'append' - Appends to an existing header

  • 'delete' - Delete a header

  • 'regex' - Perform a single regex replacement on a header

  • 'regex_repeat' - Perform a global regex replacement on a header

cache_condition[RW]

Optional name of a cache condition to apply

dst[RW]

Header to set

ignore_if_set[RW]

Don't add the header if it is already set. Only applies to the 'set' action

name[RW]

The name of the header setting

priority[RW]

Lower priorities execute first.

regex[RW]

Regular expression to use with the 'regex' and 'regex_repeat' actions.

request_condition[RW]

Optional name of a request condition to apply

response_condition[RW]

Optional name of a response condition to apply

service_id[RW]

The id of the service this belongs to.

src[RW]

Variable to be used as a source for the header content. Does not apply to the 'delete' action.

substitution[RW]

Value to substitute in place of regular expression. (Only applies to 'regex' and 'regex_repeat'.)

type[RW]
  • 'request' - Performs on the request before lookup occurs

  • 'fetch' - Performs on the request to the origin server

  • 'cache' - Performs on the response before it's stored in the cache

  • 'response' - Performs on the response before delivering to the client

version[RW]

The number of the version this belongs to.