Version: v2023-01-05 | Includes use: Yes |
|---|
Behavior name: Remove Vary Header
By default, responses that feature a Vary header value of anything other than Accept-Encoding and a corresponding Content-Encoding: gzip header aren't cached on edge servers. Vary headers indicate when a URL's content varies depending on some variable, such as which User-Agent requests it. This behavior simply removes the Vary header to make responses cacheable.
Warning: If your site relies on
Vary: User-Agentto customize content, removing the header may lead the edge to serve content inappropriate for specific devices.
Default behavior
These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.
data "akamai_property_rules_builder" "remove_vary" {
rules_v2023_01_05 {
name = "Remove Vary Header"
comments = "Removes the Vary header to make responses cacheable."
behavior {
remove_vary {
enabled = true
}
}
}
}
"behaviors": [
{
"name": "removeVary",
"options": {
"enabled": true
}
}
]
Options
| Option | Description |
|---|---|
enabled |
When enabled, removes the
Vary header to ensure objects can be cached.
|
