HTTP Variables
Action Result Variables
The following variables are made available for use in subsequent expressions and CEL interpolations after the action has run. Variable values will only apply to the last action execution, results are not concatenated.
Add Headers
actions.ngrok.add_headers.headers_addedobject
Map of headers that were added by the action.
Compress Response
actions.ngrok.compress.already_compressedboolean
Indicates whether the body was already compressed before the action was applied. Returns
true
if no further compression was performed.actions.ngrok.compress.negotiated_algorithmstring
The compression algorithm selected and applied by the action, based on the client's request and action configuration.
JWT Validation
actions.ngrok.jwt_validation.tokensarray of objects
The list of JSON Web Tokens (JWTs) processed by the action.
actions.ngrok.jwt_validation.error.codestring
A machine-readable code describing an error that occurred during the action's execution.
actions.ngrok.jwt_validation.error.messagestring
A human-readable message providing details about an error that occurred during the action's execution.
Log
actions.ngrok.log.metadataobject
A key-value map containing metadata that was logged during the action. Each key represents a metadata attribute, and the value provides its corresponding details.
Rate Limit
actions.ngrok.rate_limit.bucket_keystring
The key used for bucketing requests. This is the key used to group and track requests in the rate-limiting process, ensuring that the same bucket is subject to the rate limit across multiple requests.
actions.ngrok.rate_limit.limitedboolean
Indicates whether the request was limited by the rate limit. If
true
, the request was rate-limited based on the configured limits for the specified bucket.actions.ngrok.rate_limit.error.codestring
A machine-readable code describing an error that occurred during the action's execution.
actions.ngrok.rate_limit.error.messagestring
A human-readable message providing details about an error that occurred during the action's execution.
Redirect
actions.ngrok.redirect.matchesarray of strings
A list of elements that were matched during redirection. These represent the request components (e.g., path or query parameters) that triggered the action and resulted in the redirect.
actions.ngrok.redirect.urlstring
The URL to which the traffic was redirected. This is the destination URL returned as part of the redirect response after the action was executed.
actions.ngrok.redirect.error.codestring
A machine-readable code describing an error that occurred during the action's execution.
actions.ngrok.redirect.error.messagestring
A human-readable message providing details about an error that occurred during the action's execution.
Remove Headers
actions.ngrok.remove_headers.headers_removedarray of strings
A list of headers that were successfully removed by the action.
Restrict IPs
actions.ngrok.restrict_ips.actionstring
The action taken for this request.
- Possible values
allow
- If the request was permitted.deny
- If the request was denied.
actions.ngrok.restrict_ips.matched_cidrstring
The CIDR block that matched the incoming client's IP address. If no match was found, this value will be empty.
actions.ngrok.restrict_ips.error.codestring
A machine-readable code describing an error that occurred during the action's execution.
actions.ngrok.restrict_ips.error.messagestring
A human-readable message providing details about an error that occurred during the action's execution.
URL Rewrite
actions.ngrok.url_rewrite.matchesarray of strings
List of elements that matched the URL before the rewrite action was applied. These can be specific parts of the URL, such as the domain, path, or query parameters, that were matched based on the action configuration.
actions.ngrok.url_rewrite.urlstring
The final URL after the rewrite action has been applied. This is the new URL to which the original request is redirected after the specified modifications have been made.
actions.ngrok.url_rewrite.error.codestring
A machine-readable code describing an error that occurred during the action's execution.
actions.ngrok.url_rewrite.error.messagestring
A human-readable message providing details about an error that occurred during the action's execution.
Connection Variables
The following variables are available under the conn
namespace:
Name | Type | Description |
---|---|---|
conn.bytes_in | int64 | The number of bytes entering the endpoint from the client. |
conn.bytes_out | int64 | The number of bytes leaving an endpoint to the client. |
conn.client_ip | string | Source IP of the connection to the ngrok endpoint. |
conn.client_port | int32 | Source port of the connection to the ngrok endpoint. |
conn.server_ip | string | The IP that this connection was established on. |
conn.server_port | int32 | The port that this connection was established on. |
conn.server_region | string | The ngrok PoP (Point of Presence) that this connection was established on and serviced through. |
conn.ts.start | timestamp | Timestamp when the connection to ngrok was started. |
conn.bytes_in
The number of bytes entering the endpoint from the client.
- YAML
- JSON
Loading…
Loading…
conn.bytes_out
The number of bytes leaving an endpoint to the client.
- YAML
- JSON
Loading…
Loading…
conn.client_ip
Source IP of the connection to the ngrok endpoint.
- YAML
- JSON
Loading…
Loading…
conn.client_port
Source port of the connection to the ngrok endpoint.
- YAML
- JSON
Loading…
Loading…
conn.server_ip
The IP that this connection was established on.
- YAML
- JSON
Loading…
Loading…
conn.server_port
The port that this connection was established on.
- YAML
- JSON
Loading…
Loading…
conn.server_region
The ngrok PoP (Point of Presence) that this connection was established on and serviced through.
- YAML
- JSON
Loading…
Loading…
conn.ts.start
Timestamp when the connection to ngrok was started.
- YAML
- JSON
Loading…
Loading…
Connection Geo Variables
The following variables are available under the conn.geo
namespace:
Name | Type | Description |
---|---|---|
conn.geo.city | string | The name of the city, in EN, where the conn.client_ip is likely to originate. |
conn.geo.country | string | The name of the country, in EN, where the conn.client_ip is likely to originate. |
conn.geo.country_code | string | The two-letter ISO country code where the conn.client_ip is likely to originate. |
conn.geo.latitude | string | The approximate latitude where the conn.client_ip is likely to originate. |
conn.geo.longitude | string | The approximate longitude where the conn.client_ip is likely to originate. |
conn.geo.radius | string | The radius in kilometers around the latitude and longitude where the conn.client_ip is likely to originate. |
conn.geo.subdivision | string | The name of the subdivision, in EN, where the conn.client_ip is likely to originate. |
conn.geo.city
The name of the city, in EN, where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading…
conn.geo.country
The name of the country, in EN, where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading…
conn.geo.country_code
The two-letter ISO country code where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading …
conn.geo.latitude
The approximate latitude where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading…
conn.geo.longitude
The approximate longitude where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading…
conn.geo.radius
The radius in kilometers around the latitude and longitude where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading…
conn.geo.subdivision
The name of the subdivision, in EN, where the conn.client_ip
is likely to originate.
- YAML
- JSON
Loading…
Loading…
Connection TLS Variables
The following variables are available under the conn.tls
namespace:
Name | Type | Description |
---|---|---|
conn.tls.cipher_suite | string | The cipher suite selected during the TLS handshake. |
conn.tls.sni | string | The hostname included in the ClientHello message via the SNI extension. |
conn.tls.version | string | The version of the TLS protocol used between the client and the ngrok edge. |
conn.tls.cipher_suite
The cipher suite selected during the TLS handshake.
- YAML
- JSON
Loading…
Loading…
conn.tls.sni
The hostname included in the ClientHello
message via the SNI extension.
- YAML
- JSON
Loading…
Loading…
conn.tls.version
The version of the TLS protocol used between the client and the ngrok edge.
- YAML
- JSON
Loading…
Loading…
Connection TLS Client Variables
The following variables are available under the conn.tls.client
namespace:
Name | Type | Description |
---|---|---|
conn.tls.client.extensions | []Extension | Additional information added to the certificate. |
conn.tls.client.extensions[i].id | string | The identifier (OID) that specifies the type of extension. |
conn.tls.client.extensions[i].critical | bool | True if the extension is critical. |
conn.tls.client.extensions[i].value | []byte | The data for the extension. |
conn.tls.client.issuer | string | The issuing authority of the certificate as a string roughly following the RFC 2253 Distinguished Names syntax. |
conn.tls.client.issuer.common_name | string | Common name of the issuing authority, usually the domain name. |
conn.tls.client.issuer.country | []string | Country name(s) where the issuing authority is located. |
conn.tls.client.issuer.locality | []string | Locality or city of the issuing authority. |
conn.tls.client.issuer.organization | []string | Name(s) of the organization that issued the certificate. |
conn.tls.client.issuer.organizational_unit | []string | Division of the organization responsible for the certificate. |
conn.tls.client.issuer.postal_code | []string | Postal code of the issuing authority. |
conn.tls.client.issuer.province | []string | Province or state of the issuing authority. |
conn.tls.client.issuer.street_address | []string | Street address of the issuing authority. |
conn.tls.client.san | string | Subject alternative names of the client certificate. |
conn.tls.client.san.dns_names | []string | DNS names in the subject alternative names. |
conn.tls.client.san.email_addresses | []string | Email addresses in the subject alternative names. |
conn.tls.client.san.ip_addresses | []string | IP addresses in the subject alternative names. |
conn.tls.client.san.uris | []string | URIs in the subject alternative names. |
conn.tls.client.serial_number | string | Unique identifier for the certificate. |
conn.tls.client.signature_algorithm | string | Algorithm used to sign the certificate. |
conn.tls.client.subject | string | The entity to whom the certificate is issued as a string roughly following the RFC 2253 Distinguished Names syntax. |
conn.tls.client.subject.common_name | string | Common name of the subject, usually the domain name. |
conn.tls.client.subject.country | []string | Country name(s) where the subject of the certificate is located. |
conn.tls.client.subject.locality | []string | Locality or city where the subject is located. |
conn.tls.client.subject.organization | []string | Name(s) of the organization to which the subject belongs. |
conn.tls.client.subject.organizational_unit | []string | Division of the organization to which the subject belongs. |
conn.tls.client.subject.postal_code | []string | Postal code where the subject is located. |
conn.tls.client.subject.province | []string | Province or state where the subject is located. |
conn.tls.client.subject.street_address | []string | Street address where the subject is located. |
conn.tls.client.validity.not_after | timestamp | Expiration date and time when the certificate is no longer valid. |
conn.tls.client.validity.not_before | timestamp | Start date and time when the certificate becomes valid. |
conn.tls.client.extensions
Additional information added to the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.extensions[i].id
The identifier (OID) that specifies the type of extension.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.extensions[i].critical
True if the extension is critical.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.extensions[i].value
The data for the extension.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer
The issuing authority of the certificate as a string roughly following the RFC 2253 Distinguished Names syntax.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.common_name
Common name of the issuing authority, usually the domain name.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.country
Country name(s) where the issuing authority is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.locality
Locality or city of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.organization
Name(s) of the organization that issued the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.organizational_unit
Division of the organization responsible for the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.postal_code
Postal code of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.province
Province or state of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.issuer.street_address
Street address of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.san
Subject alternative names of the client certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.san.dns_names
DNS names in the subject alternative names.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.san.email_addresses
Email addresses in the subject alternative names.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.san.ip_addresses
IP addresses in the subject alternative names.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.san.uris
URIs in the subject alternative names.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.serial_number
Unique identifier for the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.signature_algorithm
Algorithm used to sign the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject
The entity to whom the certificate is issued as a string roughly following the RFC 2253 Distinguished Names syntax.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.common_name
Common name of the subject, usually the domain name.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.country
Country name(s) where the subject of the certificate is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.locality
Locality or city where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.organization
Name(s) of the organization to which the subject belongs.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.organizational_unit
Division of the organization to which the subject belongs.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.postal_code
Postal code where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.province
Province or state where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.subject.street_address
Street address where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.validity.not_after
Expiration date and time when the certificate is no longer valid.
- YAML
- JSON
Loading…
Loading…
conn.tls.client.validity.not_before
Start date and time when the certificate becomes valid.
- YAML
- JSON
Loading…
Loading…
Connection TLS Server Variables
The following variables are available under the conn.tls.server
namespace:
Name | Type | Description |
---|---|---|
conn.tls.server.extensions | []Extension | Additional information added to the certificate. |
conn.tls.server.extensions[i].id | string | The identifier that specifies the type of extension. |
conn.tls.server.extensions[i].critical | bool | True if the extension is critical. |
conn.tls.server.extensions[i].value | []byte | The data for the extension. |
conn.tls.server.issuer | string | The issuing authority of the certificate as a string roughly following the RFC 2253 Distinguished Names syntax. |
conn.tls.server.issuer.common_name | string | Common name of the issuing authority, usually the domain name. |
conn.tls.server.issuer.country | []string | Country name(s) where the issuing authority is located. |
conn.tls.server.issuer.locality | []string | Locality or city of the issuing authority. |
conn.tls.server.issuer.organization | []string | Name(s) of the organization that issued the certificate. |
conn.tls.server.issuer.organizational_unit | []string | Division of the organization responsible for the certificate. |
conn.tls.server.issuer.postal_code | []string | Postal code of the issuing authority. |
conn.tls.server.issuer.province | []string | Province or state of the issuing authority. |
conn.tls.server.issuer.street_address | []string | Street address of the issuing authority. |
conn.tls.server.san | string | Subject alternative names of the ngrok server's leaf TLS certificate. |
conn.tls.server.san.dns_names | []string | DNS names in the subject alternative names of the ngrok server's leaf TLS certificate. |
conn.tls.server.san.email_addresses | []string | Email addresses in the subject alternative names of the ngrok server's leaf TLS certificate. |
conn.tls.server.san.ip_addresses | []string | IP addresses in the subject alternative names of the ngrok server's leaf TLS certificate. |
conn.tls.server.san.uris | []string | URIs in the subject alternative names of the ngrok server's leaf TLS certificate. |
conn.tls.server.serial_number | string | Unique identifier for the certificate. |
conn.tls.server.signature_algorithm | string | Algorithm used to sign the certificate. |
conn.tls.server.subject | string | The entity to whom the certificate is issued as a string roughly following the RFC 2253 Distinguished Names syntax. |
conn.tls.server.subject.common_name | string | Common name of the subject, usually the domain name. |
conn.tls.server.subject.country | []string | Country name(s) where the subject of the certificate is located. |
conn.tls.server.subject.locality | []string | Locality or city where the subject is located. |
conn.tls.server.subject.organization | []string | Name(s) of the organization to which the subject belongs. |
conn.tls.server.subject.organizational_unit | []string | Division of the organization to which the subject belongs. |
conn.tls.server.subject.postal_code | []string | Postal code where the subject is located. |
conn.tls.server.subject.province | []string | Province or state where the subject is located. |
conn.tls.server.subject.street_address | []string | Street address where the subject is located. |
conn.tls.server.validity.not_after | timestamp | Expiration date and time when the certificate is no longer valid. |
conn.tls.server.validity.not_before | timestamp | Start date and time when the certificate becomes valid. |
conn.tls.server.extensions
Additional information added to the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.extensions[i].id
The identifier that specifies the type of extension.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.extensions[i].critical
True if the extension is critical.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.extensions[i].value
The data for the extension.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer
The issuing authority of the certificate as a string roughly following the RFC 2253 Distinguished Names syntax.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.common_name
Common name of the issuing authority, usually the domain name.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.country
Country name(s) where the issuing authority is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.locality
Locality or city of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.organization
Name(s) of the organization that issued the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.organizational_unit
Division of the organization responsible for the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.postal_code
Postal code of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.province
Province or state of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.issuer.street_address
Street address of the issuing authority.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.san
Subject alternative names of the server certificate of the ngrok server's leaf TLS certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.san.dns_names
DNS names in the subject alternative names of the ngrok server's leaf TLS certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.san.email_addresses
Email addresses in the subject alternative names of the ngrok server's leaf TLS certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.san.ip_addresses
IP addresses in the subject alternative names of the ngrok server's leaf TLS certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.san.uris
URIs in the subject alternative names of the ngrok server's leaf TLS certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.serial_number
Unique identifier for the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.signature_algorithm
Algorithm used to sign the certificate.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject
The entity to whom the certificate is issued as a string roughly following the RFC 2253 Distinguished Names syntax.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.common_name
Common name of the subject, usually the domain name.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.country
Country name(s) where the subject of the certificate is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.locality
Locality or city where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.organization
Name(s) of the organization to which the subject belongs.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.organizational_unit
Division of the organization to which the subject belongs.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.postal_code
Postal code where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.province
Province or state where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.subject.street_address
Street address where the subject is located.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.validity.not_after
Expiration date and time when the certificate is no longer valid.
- YAML
- JSON
Loading…
Loading…
conn.tls.server.validity.not_before
Start date and time when the certificate becomes valid.
- YAML
- JSON
Loading…
Loading…
Endpoint Variables
The following variables are available under the endpoint
namespace:
Name | Type | Description |
---|---|---|
endpoint.addr | string | The address for this endpoint. |
endpoint.host | string | The hostname for this endpoint. |
endpoint.id | string | The endpoint that serviced this connection. |
endpoint.port | int32 | The port for this endpoint. |
endpoint.protocol | string | The protocol for this endpoint. Current supported values are http , https , tcp , and tls . |
endpoint.url | string | The url for this endpoint. |
endpoint.addr
The address for this endpoint.
- YAML
- JSON
Loading…
Loading…
endpoint.host
The hostname for this endpoint.
- YAML
- JSON
Loading…
Loading…
endpoint.id
The id for this endpoint.
- YAML
- JSON
Loading…
Loading…
endpoint.port
The port for this endpoint.
- YAML
- JSON
Loading…
Loading…
endpoint.protocol
The protocol for this endpoint. Current supported values are http
, https
, tcp
, and tls
.
- YAML
- JSON
Loading…
Loading…
endpoint.url
The url for this endpoint.
- YAML
- JSON
Loading…
Loading…
Request Variables
The following variables are available under the req
namespace:
Name | Type | Description |
---|---|---|
req.content_encoding | list[string] | The encodings set in the Content-Encoding header for this request. |
req.content_length | int64 | The content length of the body in bytes. This may not be present if the request does not contain a body or if the client does not specify a content length because they are streaming the body. |
req.content_type | string | The media type set in the Content-Type header for this request. |
req.content_type.parameters | map[string]string | The parameters set in the Content-Type header for this request. |
req.content_type.raw | string | The value of the Content-Type header for this request. |
req.cookies | map[string][]cookie | The HTTP cookie objects included in this request. If there are multiple cookies with the same name, they will be ordered as specified in the Cookie header. |
req.cookies[k][i].name | string | The name of the cookie. |
req.cookies[k][i].value | string | The value of the cookie. |
req.headers | map[string][]string | The request headers parsed as a map of lower-case names to values. |
req.host | string | The value of the host header field for this request. |
req.location | string | The value of the Location header for this request. |
req.method | string | The method for this request. |
req.trailers | map[string][]string | The request trailers parsed as a map of lower-case names to values. |
req.ts.body_received | timestamp | The timestamp when ngrok received the body of the request. This may not be present if the request does not contain a body. |
req.ts.header_received | timestamp | The timestamp when ngrok received the header of the request. |
req.url | string | The normalized full URL for this request. |
req.url.authority | string | The authority portion of the URL. |
req.url.host | string | The hostname portion of the host for this request. |
req.url.path | string | The path for this request including the leading forward slash. |
req.url.port | int32 | The port portion of the URL. This may not be present if the URL does not explicitly specify a port. |
req.url.query | string | The full query string for this request excluding the leading question mark. |
req.url.query_params | map[string][]string | The request query string parsed as a map of names to values. |
req.url.raw | string | The un-normalized full URL for this request. |
req.url.raw_path | string | The un-normalized path including the leading slash for this request. |
req.url.scheme | string | The scheme for this request. |
req.url.uri | string | The URI (path and query) portion of the URL. |
req.url.user_password | string | The user:password portion of the URL. |
req.user_agent | string | The value of the User-Agent header for this request. |
req.version | string | The HTTP version for this request. |
req.content_encoding
The encoding set in the Content-Encoding
header for this request.
- YAML
- JSON
Loading…
Loading…
req.content_length
The content length of the body in bytes. This may not be present if the request does not contain a body or if the client does not specify a content length because they are streaming the body.
- YAML
- JSON
Loading…
Loading…
req.content_type
The media type set in the Content-Type
header for this request.
- YAML
- JSON
Loading…
Loading…
req.content_type.parameters
The parameters set in the Content-Type
header for this request.
- YAML
- JSON
Loading…
Loading…
req.content_type.raw
The value of the Content-Type
header for this request.
- YAML
- JSON
Loading…
Loading…
req.cookies
The HTTP cookie objects included in this request. If there are multiple cookies with the same name, they will be ordered as specified in the Cookie
header.
- YAML
- JSON
Loading…
Loading…
req.cookies[k][i].name
The name of the cookie.
- YAML
- JSON
Loading…
Loading…
req.cookies[k][i].value
The value of the cookie.
- YAML
- JSON
Loading…
Loading…
req.headers
The request headers parsed as a map of lower-case names to values.
- YAML
- JSON
Loading…
Loading…
req.host
The value of the host header field value for this request.
- YAML
- JSON
Loading…
Loading…
req.location
The value of the Location header for this request.
- YAML
- JSON
Loading…
Loading…
req.method
The method for this request.
- YAML
- JSON
Loading…
Loading…
req.trailers
The request trailers parsed as a map of lower-case names to values.
- YAML
- JSON
Loading…
Loading…
req.ts.body_received
The timestamp when ngrok received the body of the request. This may not be present if the request does not contain a body.
- YAML
- JSON
Loading…
Loading…
req.ts.header_received
The timestamp when ngrok received the header of the request.
- YAML
- JSON
Loading…
Loading…
req.url
The normalized full URL for this request.
- YAML
- JSON
Loading…
Loading…
req.url.authority
The authority portion of the URL.
- YAML
- JSON
Loading…
Loading…
req.url.host
The hostname portion of the host for this request.
- YAML
- JSON
Loading…
Loading…
req.url.path
The path for this request including the leading forward slash.
- YAML
- JSON
Loading…
Loading…
req.url.port
The port portion of the URL. This may not be present if the URL does not explicitly specify a port.
- YAML
- JSON
Loading…
Loading…
req.url.query
The full query string for this request excluding the leading question mark.
- YAML
- JSON
Loading…
Loading…
req.url.query_params
The request query string parsed as a map of names to values.
- YAML
- JSON
Loading…
Loading…
req.url.raw
The un-normalized full URL for this request.
- YAML
- JSON
Loading…
Loading…
req.url.raw_path
The un-normalized path including the leading slash for this request.
- YAML
- JSON
Loading…
Loading…
req.url.scheme
The scheme for this request.
- YAML
- JSON
Loading…
Loading…
req.url.uri
The URI (path and query) portion of the URL.
- YAML
- JSON
Loading…
Loading…
req.url.user_password
The user:password
portion of the URL.
- YAML
- JSON
Loading…
Loading…
req.user_agent
The value of the User-Agent
header for this request.
- YAML
- JSON
Loading…
Loading…
req.version
The HTTP version for this request.
- YAML
- JSON
Loading…
Loading…
Response Variables
The following variables are available under the res
namespace:
Name | Type | Description |
---|---|---|
res.content_encoding | list[string] | The encoding set in the Content-Encoding header for this response. |
res.content_length | int64 | The length of the content associated with the response. |
res.content_type | string | The media type set in the Content-Type header for this response. |
res.content_type.parameters | map[string]string | The parameters set in the Content-Type header for this response. |
res.content_type.raw | string | The Content-Type header for this response as a string. |
res.cookies | map[string][]cookie | The HTTP cookie objects included in this response. If there are multiple cookies with the same name, they will be ordered by path length, with longest path first. |
res.cookies[k][i].domain | string | The value of the Domain attribute of the cookie. |
res.cookies[k][i].expires | timestamp | The value of the Expires attribute of the cookie. |
res.cookies[k][i].http_only | boolean | The value of the HttpOnly attribute of the cookie. |
res.cookies[k][i].max_age | duration | The value of the MaxAge attribute of the cookie. |
res.cookies[k][i].name | string | The name of the cookie. |
res.cookies[k][i].path | string | The value of the Path attribute of the cookie. |
res.cookies[k][i].same_site | string | The value of the SameSite attribute of the cookie. |
res.cookies[k][i].secure | boolean | The value of the Secure attribute of the cookie. |
res.cookies[k][i].unparsed_attributes | map[string]string | Any non-standard attributes of the cookie parsed as a map of names to values . |
res.cookies[k][i].value | string | The value of the cookie. |
res.headers | map[string][]string | The response headers parsed as a map of lower-case names to values. |
res.location | string | The Location header value of this response. |
res.status_code | int32 | The status code of this response. |
res.trailers | map[string][]string | The response trailers parsed as a map of lower-case names to values. |
res.content_encoding
The encoding set in the Content-Encoding header for this response.
- YAML
- JSON
Loading…
Loading…
res.content_length
The length of the content associated with the response.
- YAML
- JSON
Loading…
Loading…
res.content_type
The media type set in the Content-Type header for this response.
- YAML
- JSON
Loading…
Loading…
res.content_type.parameters
The parameters set in the Content-Type header for this response.
- YAML
- JSON
Loading…
Loading…
res.content_type.raw
The Content-Type header for this response as a string.
- YAML
- JSON
Loading…
Loading…
res.cookies
The HTTP cookie objects included in this response. If there are multiple cookies with the same name, they will be ordered by path length, with longest path first.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].domain
The value of the Domain
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].expires
The value of the Expires
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].http_only
The value of the HttpOnly
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].max_age
The value of the MaxAge
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].name
The name of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].path
The value of the Path
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].same_site
The value of the SameSite
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].secure
The value of the Secure
attribute of the cookie.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].unparsed_attributes
Any non-standard attributes of the cookie parsed as a map of names to values.
- YAML
- JSON
Loading…
Loading…
res.cookies[k][i].value
The value of the cookie.
- YAML
- JSON
Loading…
Loading…
res.headers
The response headers parsed as a map of lower-case names to values.
- YAML
- JSON
Loading…
Loading…
res.location
The location header value of the response.
- YAML
- JSON
Loading…
Loading…
res.status_code
The status code of this response.
- YAML
- JSON
Loading…
Loading…
res.trailers
The response trailers parsed as a map of lower-case names to values.
- YAML
- JSON
Loading…
Loading…
Time variables
The following variables are available under the time
namespace:
Name | Type | Description |
---|---|---|
time.now | string | The current UTC time in RFC3339 format. |
time.now
The current UTC time in RFC3339 format.
- YAML
- JSON
Loading…
Loading…