feat: Add a rust plugin to add geo query string to URL#294
feat: Add a rust plugin to add geo query string to URL#294mateustd-ciandt wants to merge 10 commits into
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
|
See comment #289 (comment) , the plugin should access geo information via the get_property() API, in anticipation of attribute support for geo info to be added in Q1. |
| use proxy_wasm::traits::{Context, HttpContext}; | ||
| use proxy_wasm::types::{Action, LogLevel}; | ||
|
|
||
| const CLIENT_REGION_PATH: &[&str] = &["request", "client_region"]; |
There was a problem hiding this comment.
I think it is more idiomatic to adjust this to be:
const CLIENT_REGION_PATH: [&str] = ["request", "client_region"];
There was a problem hiding this comment.
Hi Mike! I believe in Rust [&str] doesn't compile because unsized types cannot be used in const. So as far as I know, we need either &[&str] (reference to slice) or [&str; 2] (array with explicit size).
…td-ciandt/service-extensions-samples into rust-plugin-add-geo-query
Adding a new rust plugin in order to modulate content based on the country value.
This value is added as a query string name value pair in the URL.
The query string value is also available in the normal GCP logs.
C++ version PR: #289