Coder Social home page Coder Social logo

Comments (6)

mzanibelli avatar mzanibelli commented on August 19, 2024 2
  • 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 lowercase g)
  • 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.

mzanibelli avatar mzanibelli commented on August 19, 2024

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.

taik0 avatar taik0 commented on August 19, 2024

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.

mzanibelli avatar mzanibelli commented on August 19, 2024

Interesting... thanks for your feedback. I'll dig a bit more.

from krakend-martian.

taik0 avatar taik0 commented on August 19, 2024

Thank you for reporting this @mzanibelli !

from krakend-martian.

github-actions avatar github-actions commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.