Comments (6)
- I did
go get -u ./...
- Somehow
github.com/spf13/viper
got updated to v1.13.0 - spf13/viper#1387 is causing havoc, converting all
extra_config
keys to lowercase, recursively - I get
parse: unknown modifier: fifo.group
(note lowercaseg
) - I had a mistake in my krakend-ce setup that prevented this bad boy to show up, leading to a much longer debug session 😓
PSA: Viper 1.13.0 does not work (yet) with KrakenD.
from krakend-martian.
Example configuration:
{
"endpoint": "/debug/plain",
"method": "GET",
"output_encoding": "no-op",
"backend": [
{
"url_pattern": "/",
"encoding": "no-op",
"method": "POST",
"host": ["http://127.0.0.1:8895"],
"extra_config": {
"modifier/martian": {
"fifo.Group": {
"scope": ["request"],
"aggregateErrors": true,
"modifiers": [
{
"body.Modifier": {
"scope": ["request"],
"body": "dmVyc2lvbj01"
}
},
{
"header.Modifier": {
"scope": ["request"],
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
}
]
}
}
}
}
]
}
I should be able to see version=5
in the request body received by the backend.
Edit: simplified configuration, copy pasted in the middle of weird tests.
from krakend-martian.
This configuration seems to work for me:
[KRAKEND] 2022/10/05 - 15:48:41.060 ▶ DEBUG [ENDPOINT: /__debug/*] Method: POST
[KRAKEND] 2022/10/05 - 15:48:41.060 ▶ DEBUG [ENDPOINT: /__debug/*] URL: /__debug/maritan
[KRAKEND] 2022/10/05 - 15:48:41.060 ▶ DEBUG [ENDPOINT: /__debug/*] Query: map[]
[KRAKEND] 2022/10/05 - 15:48:41.061 ▶ DEBUG [ENDPOINT: /__debug/*] Params: [{param /maritan}]
[KRAKEND] 2022/10/05 - 15:48:41.061 ▶ DEBUG [ENDPOINT: /__debug/*] Headers: map[Accept-Encoding:[gzip] Content-Length:[9] Content-Type:[application/x-www-form-urlencoded] User-Agent:[KrakenD Version 2.1.0] X-Forwarded-For:[172.17.0.1] X-Forwarded-Host:[localhost:8080]]
[KRAKEND] 2022/10/05 - 15:48:41.062 ▶ DEBUG [ENDPOINT: /__debug/*] Body: version=5
[GIN] 2022/10/05 - 15:48:41 | 200 | 3.943291ms | 172.17.0.1 | POST "/__debug/maritan"
[GIN] 2022/10/05 - 15:48:41 | 200 | 55.671417ms | 172.17.0.1 | GET "/martian"
from krakend-martian.
Interesting... thanks for your feedback. I'll dig a bit more.
from krakend-martian.
Thank you for reporting this @mzanibelli !
from krakend-martian.
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.
from krakend-martian.
Related Issues (9)
- Modify the url from the request's query params to backend path params HOT 3
- id_modifier error HOT 6
- martian plugin HOT 3
- How to use CEL with krakend-martian? HOT 8
- panic: runtime error: invalid memory address or nil pointer dereference HOT 1
- header.Filter not working without defined value
- access to application logger HOT 2
- Martian status modifier is not supported. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from krakend-martian.