From e9762fe95fe1d5e47091be21965d17f26272ba16 Mon Sep 17 00:00:00 2001 From: Abdallah-Zidan <51304011+Abdallah-Zidan@users.noreply.github.com> Date: Thu, 28 Mar 2024 19:34:03 +0200 Subject: [PATCH] docs: fix example in ctx.md fix check_beta_user function parameter type --- docs/user_guide/ctx.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user_guide/ctx.md b/docs/user_guide/ctx.md index 2d585e6..73775fe 100644 --- a/docs/user_guide/ctx.md +++ b/docs/user_guide/ctx.md @@ -14,7 +14,7 @@ pub struct MyCtx { beta_user: bool, } -fn check_beta_user(req: &pingora_http::RequestHeader) -> bool { +fn check_beta_user(req: &pingora::http::RequestHeader) -> bool { // some simple logic to check if user is beta req.headers.get("beta-flag").is_some() } @@ -113,4 +113,4 @@ impl ProxyHttp for MyProxy { The complete example can be found under [`pingora-proxy/examples/ctx.rs`](../../pingora-proxy/examples/ctx.rs). You can run it using `cargo`: ``` RUST_LOG=INFO cargo run --example ctx -``` \ No newline at end of file +```