Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander committed Sep 2, 2024
1 parent 34c67f0 commit 204ddb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/user_guide/phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Pingora-proxy allows users to insert arbitrary logic into the life of a request.
### `early_request_filter()`
This is the first phase of every request.

This function is similar to `request_filter()` but execute before any other logic especially the downstream modules.
This function is similar to `request_filter()` but executes before any other logic, including downstream module logic. The main purpose of this function is to provide finer-grained control of the behavior of the modules.

### `request_filter()`
This phase is usually for validating request inputs, rate limiting, and initializing context.
Expand Down
6 changes: 3 additions & 3 deletions pingora-proxy/src/proxy_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ pub trait ProxyHttp {

/// Handle the incoming request before any downstream module is executed.
///
/// This function is similar to [Self::request_filter()] but execute before any other logic
/// especially the downstream modules. The main purpose of this function is to provide finer
/// grained control of behavior of the modules.
/// This function is similar to [Self::request_filter()] but executes before any other logic,
/// including downstream module logic. The main purpose of this function is to provide finer
/// grained control of the behavior of the modules.
///
/// Note that because this function is executed before any module that might provide access
/// control or rate limiting, logic should stay in request_filter() if it can in order to be
Expand Down

0 comments on commit 204ddb0

Please sign in to comment.