Skip to main content
FastEdge CDN applications read and modify request and response data through the get_property and set_property host functions. The table below lists all properties accessible through this API. HTTP headers are read and written through dedicated header methods (get_http_request_header, set_http_response_header, etc.) and are not included here.

Available properties

Property pathTypeAccessAvailable inDescription
request.urlStringRead-writeon_http_request_headersOriginal URL path before modifications
request.hostStringRead-writeon_http_request_headersHost header value
request.pathStringRead-writeon_http_request_headersRequest URL path
request.schemeStringRead-onlyon_http_request_headersProtocol scheme (http or https)
request.methodStringRead-onlyon_http_request_headersHTTP method
request.extensionStringRead-onlyon_http_request_headersFile extension from the request path
request.queryStringRead-writeon_http_request_headersQuery string
request.countryStringRead-onlyon_http_request_headersTwo-letter country code, derived from client IP
request.cityStringRead-onlyon_http_request_headersCity name, derived from client IP
request.asnStringRead-onlyon_http_request_headersASN of the network associated with the client IP
request.geo.latStringRead-onlyon_http_request_headersLatitude, derived from client IP
request.geo.longStringRead-onlyon_http_request_headersLongitude, derived from client IP
request.regionStringRead-onlyon_http_request_headersRegion, derived from client IP
request.continentStringRead-onlyon_http_request_headersContinent, derived from client IP
request.country.nameStringRead-onlyon_http_request_headersCountry name, derived from client IP
nginx.log_field1StringWrite-onlyon_http_request_headersAppends a value to the CDN access log. Requires Log Uploader.
response.statusIntegerRead-onlyon_http_response_headers, on_http_response_bodyHTTP response status code
Property paths are case-sensitive. The following example reads the client country and conditionally sets the log field:

Custom properties

Applications can define custom properties to pass state between related hooks. For example, a property set in on_http_response_headers is readable in on_http_response_body.
Custom properties created in on_http_request_headers are not available in later hooks.
The following example marks a response as Markdown in on_http_response_headers and reads that flag in on_http_response_body: