capabilities.work

Add a Header Rule

A 3-step recipe with Fastly. We can help you get access.

Recipe · 3 steps

Add a Header Rule

with Fastly

Clone a version, add a header rule, and activate the clone.

  1. Clone the supplied version into a new editable draft version.
  2. Create the header manipulation rule on the cloned version.
  3. Activate the cloned version so the header rule takes effect.
What you'll need to have ready
  • apiToken: The Fastly API token used to authenticate requests.
  • serviceId: The alphanumeric identifier of the service.
  • versionId: The version number to clone.
  • headerName: A name for the header rule.
  • action: The header action to perform.
  • type: The processing phase the rule applies to.
  • dst: The name of the header to affect (the destination).
  • src: The source value or variable for the header.
For your developer

Arazzo workflow fastly:add-header-rule, 3 operations: cloneServiceVersion → createHeader → activateServiceVersion. Specs on APIs.io.