mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
document early_request_filter
Fix #363 Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This commit is contained in:
parent
1b9e8eead1
commit
34c67f0aca
2 changed files with 8 additions and 3 deletions
|
@ -16,7 +16,8 @@ The pingora-proxy HTTP proxy framework supports highly programmable proxy behavi
|
|||
Pingora-proxy allows users to insert arbitrary logic into the life of a request.
|
||||
```mermaid
|
||||
graph TD;
|
||||
start("new request")-->request_filter;
|
||||
start("new request")-->early_request_filter;
|
||||
early_request_filter-->request_filter;
|
||||
request_filter-->upstream_peer;
|
||||
|
||||
upstream_peer-->Connect{{IO: connect to upstream}};
|
||||
|
@ -52,9 +53,12 @@ Pingora-proxy allows users to insert arbitrary logic into the life of a request.
|
|||
* The reason both `upstream_response_*_filter()` and `response_*_filter()` exist is for HTTP caching integration reasons (still WIP).
|
||||
|
||||
|
||||
### `request_filter()`
|
||||
### `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.
|
||||
|
||||
### `request_filter()`
|
||||
This phase is usually for validating request inputs, rate limiting, and initializing context.
|
||||
|
||||
### `proxy_upstream_filter()`
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
Pingora proxy phases without caching
|
||||
```mermaid
|
||||
graph TD;
|
||||
start("new request")-->request_filter;
|
||||
start("new request")-->early_request_filter;
|
||||
early_request_filter-->request_filter;
|
||||
request_filter-->upstream_peer;
|
||||
|
||||
upstream_peer-->Connect{{IO: connect to upstream}};
|
||||
|
|
Loading…
Reference in a new issue