This topic describes EdgeScript built-in variables and the corresponding NGINX variables.

The following table lists the EdgeScript built-in variables.
Built-in variable Description NGINX variable
$arg_{name} The value of the name parameter in the Query String. The Query String represents request parameters in an HTTP request. $arg_
$http_{name} The value of the name field in the request header. $http_
$cookie_{name} The value of the name field in the request cookie header. $cookie_
$scheme The protocol type. $scheme
$server_protocol The version of the protocol. $server_protocol
$host The original host. $host
$uri The original URI. -
$args $args represents all request parameters in an HTTP request, excluding question marks (?). For example, the URI of the request is http://www.a.com/1k.file?k1=v1&k2=v2.
  • $arg_k1 returns the value of the k1 parameter: v1.
  • $args is used to return the entire Query String: k1=v1&k2=v2. Question marks (?) are excluded.
$args
$request_method The HTTP method. $request_method
$request_uri uri + '?' + args. $request_uri
$remote_addr The IP address of the client that sends the request. $remote_addr
Note
  • The dollar sign ($) before a variable is used to indicate that the variable is a built-in variable. You can remove the dollar sign as needed.
  • Do not assign values to built-in variables in the same way as parameters.