You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KrakenD version: 2.5.0
System info: docker
Hardware specs: M2 mac with 64gb RAM
Backend technology: N/A
Additional environment information:
Describe what are you trying to do:
trying do what the title says. extract data from the body sent to the gateway, and use in the headers of the request to the backend service.
it looks like this is only possible with enterprise.... is there a trial period for enterprise so i can do a load test to see if this is something i want?
curl -XPOST -d 'hithere' http://localhost:8080/test
{"req_headers":{"Accept-Encoding":["gzip"],"Content-Type":["application/x-www-form-urlencoded"],"User-Agent":["KrakenD Version 2.5.0"],"X-Body1":["hithere"],"X-Forwarded-For":["172.17.0.1"],"X-Forwarded-Host":["localhost:8080"]}}
If your body is in JSON or another format, you will additionally need to parse the body (because it comes as a string) if you want a specific field, but other than that you can see this is feasible in CE.
If you want to test the EE version you can get in touch with sales@krakend.io
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.
Environment info:
KrakenD version: 2.5.0
System info: docker
Hardware specs: M2 mac with 64gb RAM
Backend technology: N/A
Additional environment information:
Describe what are you trying to do:
trying do what the title says. extract data from the body sent to the gateway, and use in the headers of the request to the backend service.
Your configuration file:
{
"$schema": "https://www.krakend.io/schema/krakend.json",
"version": 3,
"name": "Developer API",
"timeout": "60s",
"extra_config": {
"telemetry/logging": {
"level": "DEBUG",
"prefix": "[KRAKEND]",
"syslog": true,
"stdout": true,
"format": "logstash",
"syslog_facility": "local3"
},
"telemetry/logstash": {
"enabled": true
}
},
"timeout": "3000ms",
"cache_ttl": "300s",
"output_encoding": "json",
"debug_endpoint": true,
"echo_endpoint": true,
"endpoints": [
{
"endpoint": "/publicapi/v1/{route}",
"method": "GET",
"output_encoding": "no-op",
"backend": [
{
"url_pattern": "/publicapi/v1/{route}",
"encoding": "no-op",
"sd": "static",
"method": "GET",
"disable_host_sanitize": false,
"host": [
"https://api.localhost.com"
]
}
]
},
{
"endpoint": "/publicapi/v1/{route}",
"method": "POST",
"output_encoding": "no-op",
"backend": [
{
"url_pattern": "/publicapi/v1/{route}",
"encoding": "no-op",
"sd": "static",
"method": "POST",
"disable_host_sanitize": false,
"host": [
"https://api.localhost.com"
]
}
],
"input_headers": [
"*"
]
},
{
"endpoint": "/oauth2/authorize",
"method": "GET",
"output_encoding": "no-op",
"backend": [
{
"url_pattern": "/",
"encoding": "no-op",
"method": "GET",
"host": [
"https://signin.localhost.com"
]
}
],
"extra_config": {
"modifier/lua-proxy": {
"post": "local r = response.load(); local req = request.load(); print(req:query()); r:statusCode(301); r:headers('location', 'https://signin.localhost.com/authorize?' .. req:query())"
}
}
}
]
}
The text was updated successfully, but these errors were encountered: