Enhance Transform Rules with JWT claims · Cloudflare API Shield docs | Latest TMZ Celebrity News & Gossip | Watch TMZ Live Skip to content
Cloudflare Docs

Enhance Transform Rules

You can forward information from a JSON Web Token (JWT) to the origin in a header by creating Transform Rules using claims that Cloudflare has verified via the JSON Web Token.

Claims are available through the http.request.jwt.claims firewall fields.

For example, the following expression will extract the user claim from a token processed by the token configuration with TOKEN_CONFIGURATION_ID:

lookup_json_string(http.request.jwt.claims["<TOKEN_CONFIGURATION_ID>"][0], "claim_name")

Refer to Configure JWT validation for more information about creating a token configuration.

Create a Transform Rule

As an example, to send the x-send-jwt-claim-user request header to the origin, you must create a Transform Rule:

  1. Log in to the Cloudflare dashboard, and select your account and domain.
  2. Go to Rules > Overview.
  3. Next to Request Header Transform Rules, select Create rule.
  4. Enter a rule name and a filter expression, if applicable.
  5. Choose Set dynamic.
  6. Set the header name to x-send-jwt-claim-user.
  7. Set the value to:
    lookup_json_string(http.request.jwt.claims["<TOKEN_CONFIGURATION_ID>"][0], "claim_name")
    <TOKEN_CONFIGURATION_ID> is your token configuration ID found in JWT validation and claim_name is the JWT claim you want to add to the header.

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.