validate_​entity_​tag

Version: v2025-01-13Includes use: Yes

Behavior name: Validate Entity Tag (ETag)

Instructs edge servers to compare the request's ETag header with that of the cached object. If they differ, the edge server sends a new copy of the object. This validation occurs in addition to the default validation of Last-Modified and If-Modified-Since headers.

You can specify whether this behavior should support only strong ETag values, ignoring weak ETag and always returning a full response, or weak values should also be accepted. For more details, see the RFC Standard.

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" "validate_entity_tag" {
  rules_v2025_02_18 {
    name     = "Validate Entity Tag (ETag)"
    comments = "Instructs edge servers to compare the request's ETag header with that of the cached object."
    behavior {
      validate_entity_tag {
        enabled            = true
        non_strict_enabled = true
        weak_enabled       = false
      }
    }
  }
}
"behaviors": [
  {
    "name": "validateEntityTag",
    "options": {
      "enabled": true,
      "nonStrictEnabled": true,
      "weakEnabled": false
    }
  }
]

Options

Option Description
enabled
Enables the ETag validation behavior.
non_strict_enabled
Whether you want to allow strong ETag values that are not surrounded by double quotes. Technically these are malformed and non-standard, but are commonly used.
weak_enabled
Whether you want to allow weak ETag values that start with W/.