Set Variable: extraction

πŸ“˜

A variable must exist before you can manipulate it. To create a new variable, see Create a Variable.

Extract value

  1. In the Set Variable behavior, select the variable you want to modify.

  2. In the Create Value From field, select Extract.

  3. In the Get Data From field, select the location you want to extract the value from. See the Extract locations table for more details.

  4. Depending on the location you chose, specify the parameters by which the edge servers generate the variable value.

  5. Optionally, in the Operation field, apply a transformation.

Extract data from built-in variables

Built-in variables offer a basic set of information about a request. With the Set Variable behavior, you can extract additional information from that request, such as specific cookie or header names, location data, networks quality, or certificates.

Incorporate a built-in variable into a user-defined variable to extract additional information from that request.

Extract locations

Request header

Enter the HTTP header. The header name is case insensitive.

Response header

Enter the HTTP header. The header name is case insensitive.

Client certificate

Extract a value from the client-side SSL certificate.

Certificate fieldDescription
Version NumberThe certificate's X509 version number.
SerialThe serial number in hex.
MD5 FingerprintThe MD5 fingerprint, hex encoded. (This value is generated by the <> server based on the certificate's contents).
SH1 FingerprintThe SHA1 fingerprint, hex encoded. (This value is generated by the <> server based on the certificate's contents).
Hashed FingerprintThe fingerprint hashed based on the hashing algorithm in signature_algorithm, hex encoded. (This value is generated by the <> server based on the certificate's contents).
Issuer NameThe distinguished name field of the issuer (signer).
Subject NameThe distinguished name field of the user.
Not Before DateThe not-before date in YYYY/MM/DD HH:MI:SS ZONE format. The ZONE (such as GMT) will only be displayed if it's present in the certificate.
Not After DateThe not-after date in YYYY/MM/DD HH:MI:SS ZONE format. The ZONE (such as GMT) will only be displayed if it's present in the certificate
Certificate DER FormattedThe entire DER encoded certificate in hex. If the customer wants us to pass this to the origin, the other fields shouldn't be passed as they're all extracted from this value.
Certificate PEM FormattedThe certificate in PEM format base64 encoded as one single line without any new-line characters or carriage returns.
Cert PEM No LabelsThe certificate in PEM format without the header and footer base64 encoded as one single line without any new-line characters or carriage returns.
CountThe number of client certificates received. Normally, this should be 1. If the client submits a chain, it will contain the number of all certificates received. If the client doesn't submit a certificate, its value is 0. (This value is generated by the <> server).
Status MessageA short message regarding the outcome of the certificate validation. If the certificate is missing, its value is "missing". If it passed validation, its value is "ok". Otherwise, it contains a very short description of the problem (such as "Certificate has expired", etc).
Key LengthReturns the size of the key in bits. For example, a 1024 bit RSA key returns "1024". This is helpful to determine FIPS-compliance of a certificate.

Request cookie

Enter the cookie name. This is case sensitive.

Edgescape data

Edgescape fields from which you can extract values:

  • Country code

  • Geographic Region

  • Region Code

  • County

  • FIPS

  • Network

  • Throughput

  • City

  • DMA

  • Area Code

  • Lattitude

  • Longitude

  • Network Type

  • Primary Metropolitan Statistical Area

  • Metropolitan Statistical area

  • Zip Code

  • Timezone

  • Continent

  • As Number

Path component offset

Choose which value in the URL you want to use as the variable's value. You can use negative index (-1) to extract the right part of the path.

πŸ“˜

In a path of /x/y/z/index.htmlPath component offset 1 is xPath component offset 2 is yPath component offset 3 is z.

Query string parameter

Enter the query string parameter name. This is case sensitive.