Document updated on Sep 3, 2025
HTTP Per-backend Client settings
The HTTP client namespace allows you to set the behavior of the HTTP connections between KrakenD and your backend service.
Send the payload on 307 and 308 redirects
KrakenD does not duplicate the body of the request when following a redirection because automatically doing it would affect the performance of all requests. In the unusual cases where your backend responds with a 307 Temporary Redirect
or a 308 Permanent Redirect
, enable the following flag to resend the original payload to the final redirected service:
Fields of "backend/http_client"
enable_redirect_post
boolean- Post the original body to the final URL after a 307 or a 308 redirection.Defaults to
false
Here is a configuration example:
{
"version": 3,
"$schema": "https://www.krakend.io/schema/v2.11/krakend.json",
"endpoints": [
{
"endpoint": "/foo",
"backend": [
{
"host": ["https://api"],
"url_pattern": "/url-that-will-redirect-with-307",
"extra_config": {
"backend/http/client": {
"enable_redirect_post": true
}
}
}
]
}
]
}
Avoid HTTP redirection and other options
To prevent KrakenD from following redirects, use specific TLS options, and utilize intermediate proxies and other options, refer to the HTTP Client options in the Enterprise Edition.
Contribute to KrakenD Documentation. Improve this page »