Modify Incoming Response Header

Modify, add, remove, or pass along specific response headers coming downstream from the origin.

Why you need it

Use this behavior to decide how selected response headers coming downstream from the origin should be processed. For example, you can add headers such as Cache-Control or Expires to specify caching policy and ensure security of users' cookies. By controlling the content of your headers you can further customize your website visitor's experience and gain insight into how it's used.

How it works

When enabled, this behavior modifies the specified incoming response header according to set rules. A response header added using this behavior is effectively added before the object is processed by the ​Akamai​ server, so if the response is cacheable, it is stored with the cached object. This is in contrast to the Modify Outgoing Response Header behavior, which adds the response header after the response is processed by the ​Akamai​ server and retrieved either from the customer origin or from cache, immediately before it is sent to the requesting client.

Example

If you serve duplicate web pages from multiple origins, and you want to 'tag' each page with an indicator of the origin from which it was served (for debugging purposes), you could use this behavior to add a response header called e.g., Origin-Server-ID and include variables identifying the origin server and the time it was added to cache:

Whenever the page is served to a client, they can view this header and see when this page was originally cached and from which origin server it was retrieved. Note that possibly 'sensitive' information such as this should be obfuscated or encrypted, as you may not wish your end-users to know too much information about your caching strategy.

Features and options

FieldWhat it doesSub-options
ActionSpecifies the action to perform on the header.
  • Add
  • Remove
  • Modify. This option replaces the entire value of the header.
  • Pass. Make no change to the header.
Select Header NameSelect from standard pre-defined headers to modify.With Action set to Add.
  • Cache-Control
  • Content-Type
  • Edge-Control
  • Expires
  • Last-Modified
  • Other...


With Action set to Remove.
  • Cache-Control
  • Content-Type
  • Vary
  • Other...


With Action set to Modify.
  • Cache-Control
  • Content-Type
  • Edge-Control
  • Other...


With Action set to Pass:
  • Cache-Control
  • Expires
  • Pragma
  • Other...
Header ValueWith 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 NameWith 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 ValueWith 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 HeadersWith Action set to Modify, prevents multiple headers with the same name from being created. Note that this applies only to headers added using this behavior - it does not apply to headers added at the origin.

Did this page help you?