Document updated on Jan 28, 2021
Client redirects
When a backend returns a redirect, the default behaviour of KrakenD is to follow the redirection and serve the final content to the user. When this behaviour needs to be prevented and let the end-client follow the redirect itself, then you need to enable the krakend-redirect
plugin.
Client redirect configuration
You can stop KrakenD from following redirections like 301 with the following configuration in your backend
section:
{
"endpoint": "/redirect",
"output_encoding": "no-op",
"backend": [
{
"url_pattern": "/__debug",
"encoding": "no-op",
"extra_config": {
"github.com/devopsfaith/krakend/transport/http/client/executor": {
"name": "krakend-redirect"
}
}
}
]
}
Important: The only encoding you can use is no-op
for both the output_encoding
of the endpoint and the encoding
of the backend.
There is no additional configuration other than enabling the plugin needed.
