From 49010f03f008199e41821495aa568171fcbcad96 Mon Sep 17 00:00:00 2001 From: Marek Libra Date: Wed, 30 Apr 2025 11:33:15 +0200 Subject: [PATCH] fix(doc): document reviveConsumedRequestBodies proxy configuration Signed-off-by: Marek Libra --- docs/plugins/proxying.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/plugins/proxying.md b/docs/plugins/proxying.md index 26329f8475..b32ed4fe12 100644 --- a/docs/plugins/proxying.md +++ b/docs/plugins/proxying.md @@ -41,6 +41,7 @@ Example: ```yaml # in app-config.yaml proxy: + reviveConsumedRequestBodies: true endpoints: /simple-example: http://simple.example.com:8080 '/larger-example/v1': @@ -121,6 +122,12 @@ third parties. The same logic applies to headers that are sent from the target back to the frontend. +### Passing POST-request body + +To fix the issue with missing request body passed by proxy to the target, set `proxy.reviveConsumedRequestBodies: true`, so the `fixRequestBody` handler of [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware?tab=readme-ov-file#intercept-and-manipulate-requests) will be used. + +In that case, mind setting the `Content-Type` header to either `application/json` or `application/x-www-form-urlencoded`. + ### Proxy Extension Endpoint The proxy plugin additionally supports a `proxyExtensionEndpoint` which a proxy