You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: context/reference/PROPERTIES_REFERENCE.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
Properties are read-only metadata about the current request and client, available via `proxy_get_property()` in ProxyWasm apps. They provide context that isn't in the HTTP headers themselves.
4
4
5
+
**Path format:** Always pass the property identifier as a single dotted string in a one-element vec — e.g., `vec!["request.path"]`, `vec!["request.geo.long"]`. Do **not** split on dots (e.g., `vec!["request", "country"]` is incorrect).
6
+
5
7
---
6
8
7
9
## Available Properties
@@ -40,13 +42,13 @@ Properties are read-only metadata about the current request and client, availabl
**Path format:** Always pass the property identifier as a single dotted string in a one-element vec — e.g., `vec!["request.path"]`, `vec!["response.status"]`, `vec!["request.geo.long"]`. Do **not** split on dots (e.g., `vec!["response", "status"]` is incorrect).
|`request.x_real_ip`| UTF-8 string | Client IP address |
312
+
|`request.country`| UTF-8 string | 2-letter ISO country code (geo-IP) |
313
+
|`request.country.name`| UTF-8 string | Full country name |
314
+
|`request.city`| UTF-8 string | City name |
315
+
|`request.region`| UTF-8 string | Region/state |
316
+
|`request.continent`| UTF-8 string | Continent |
317
+
|`request.asn`| UTF-8 string | Autonomous System Number |
318
+
|`request.geo.lat`| UTF-8 string | Latitude |
319
+
|`request.geo.long`| UTF-8 string | Longitude |
320
+
|`response.status`| 2-byte big-endian u16 | Response status code (**binary, NOT a string** — decode with `u16::from_be_bytes`) |
319
321
320
322
Most properties are UTF-8 strings decoded with `std::str::from_utf8()`. The `response.status` property is binary-encoded and must be decoded as a big-endian `u16`. Do not use `String::from_utf8` for this property.
|`Store::new()`|`Result<Self, Error>`| Open the default store |
381
-
|`Store::open(name: &str)`|`Result<Self, Error>`| Open a named store |
382
-
|`Store::get(key: &str)`|`Result<Option<Vec<u8>>, Error>`| Get the value for a key; `None` if key does not exist |
383
-
|`Store::scan(pattern: &str)`|`Result<Vec<String>, Error>`| List keys matching a glob-style pattern |
384
-
|`Store::zrange_by_score(key: &str, min: f64, max: f64)`|`Result<Vec<(Vec<u8>, f64)>, Error>`| Get sorted-set members with scores between min and max |
385
-
|`Store::zscan(key: &str, pattern: &str)`|`Result<Vec<(Vec<u8>, f64)>, Error>`| Scan sorted-set members matching a pattern |
386
-
|`Store::bf_exists(key: &str, item: &str)`|`Result<bool, Error>`| Test whether an item is in a Bloom filter |
|`Store::new()`|`Result<Self, Error>`| Open the default store |
383
+
|`Store::open(name: &str)`|`Result<Self, Error>`| Open a named store |
384
+
|`Store::get(key: &str)`|`Result<Option<Vec<u8>>, Error>`| Get the value for a key; `None` if key does not exist |
385
+
|`Store::scan(pattern: &str)`|`Result<Vec<String>, Error>`| List keys matching a glob-style pattern |
386
+
|`Store::zrange_by_score(key: &str, min: f64, max: f64)`|`Result<Vec<(Vec<u8>, f64)>, Error>`| Get sorted-set members with scores between min and max |
387
+
|`Store::zscan(key: &str, pattern: &str)`|`Result<Vec<(Vec<u8>, f64)>, Error>`| Scan sorted-set members matching a pattern |
388
+
|`Store::bf_exists(key: &str, item: &str)`|`Result<bool, Error>`| Test whether an item is in a Bloom filter |
|**Advanced data structures**| No | Sorted sets, bloom filters, glob scan | No |
353
+
|**Confidentiality**| Not encrypted; visible in config | Not encrypted at the application layer | Encrypted at rest; access-controlled |
354
+
|**Typical use cases**| Feature flags, routing config, tuning | Caching, counters, state, rate-limit data | API keys, tokens, certificates, credentials |
355
+
|**Versioning / rotation**| No | No | Yes, via `get_effective_at`|
356
356
357
357
Use `dictionary` for simple, non-sensitive string configuration that is known at deployment time. Use `key_value` for larger datasets, binary values, or data that requires advanced query patterns. Use `secret` for any value that must be kept confidential.
|[quickstart.md](quickstart.md)| Getting started: project setup, writing a handler, building to WASM (`wasm32-wasip2` for async, `wasm32-wasip1` for basic/CDN) |
|[quickstart.md](quickstart.md)| Getting started: project setup, writing a handler, building to WASM (`wasm32-wasip2` for async, `wasm32-wasip1` for basic/CDN) |
Copy file name to clipboardExpand all lines: fastedge-plugin-source/.generation-config.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -398,7 +398,7 @@ Do NOT document or suggest:
398
398
**Known limitation — header removal:** On the FastEdge CDN (nginx-based), removing a header via the proxy-wasm API sets its value to an empty string rather than fully removing it. Keep this in mind when checking for header presence.
399
399
400
400
**Request Properties:**
401
-
CDN apps access request metadata via `self.get_property(vec![...])`. Document ALL available properties on the FastEdge platform:
401
+
CDN apps access request metadata via `self.get_property(vec![...])`. **Path format:** Always pass the property identifier as a single dotted string in a one-element vec — e.g., `vec!["request.path"]`, `vec!["response.status"]`, `vec!["request.geo.long"]`. Do **not** split on dots (e.g., `vec!["response", "status"]` is incorrect). Document ALL available properties on the FastEdge platform:
0 commit comments