aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-proxy
diff options
context:
space:
mode:
authorYuchen Wu <[email protected]>2024-06-25 16:25:22 -0700
committerYuchen Wu <[email protected]>2024-07-12 11:24:29 -0700
commit65b1d6c733babb74df1b4bdf6a0c5e5c8e1b7a6a (patch)
treee5bc4a68caeb88a63c5ac210aa0456637ecef65e /pingora-proxy
parentee7f66082fd1578758c59855b03bda7d90b0a16a (diff)
downloadpingora-65b1d6c733babb74df1b4bdf6a0c5e5c8e1b7a6a.tar.gz
pingora-65b1d6c733babb74df1b4bdf6a0c5e5c8e1b7a6a.zip
Invoke request_body_filter of modules for proxies
Diffstat (limited to 'pingora-proxy')
-rw-r--r--pingora-proxy/src/proxy_h1.rs5
-rw-r--r--pingora-proxy/src/proxy_h2.rs5
2 files changed, 10 insertions, 0 deletions
diff --git a/pingora-proxy/src/proxy_h1.rs b/pingora-proxy/src/proxy_h1.rs
index de49c03..1dbb561 100644
--- a/pingora-proxy/src/proxy_h1.rs
+++ b/pingora-proxy/src/proxy_h1.rs
@@ -546,6 +546,11 @@ impl<SV> HttpProxy<SV> {
// affected by the request_body_filter
let end_of_body = end_of_body || data.is_none();
+ session
+ .downstream_modules_ctx
+ .request_body_filter(&mut data, end_of_body)
+ .await?;
+
self.inner
.request_body_filter(session, &mut data, end_of_body, ctx)
.await?;
diff --git a/pingora-proxy/src/proxy_h2.rs b/pingora-proxy/src/proxy_h2.rs
index c213857..5216ee9 100644
--- a/pingora-proxy/src/proxy_h2.rs
+++ b/pingora-proxy/src/proxy_h2.rs
@@ -525,6 +525,11 @@ impl<SV> HttpProxy<SV> {
SV: ProxyHttp + Send + Sync,
SV::CTX: Send + Sync,
{
+ session
+ .downstream_modules_ctx
+ .request_body_filter(&mut data, end_of_body)
+ .await?;
+
self.inner
.request_body_filter(session, &mut data, end_of_body, ctx)
.await?;