Skip to content

input_query_strings filter on backend doesn't work? #1023

@EvgeniyGorbunenko

Description

@EvgeniyGorbunenko

Environment info:

  • KrakenD version: 2.9.4
  • System info: docker
  • Hardware specs: M1, 16GB RAM
  • Backend technology: KrakenD debug
  • Additional environment information: I reproduce it on the repository https://github.com/krakend/playground-community for example

Describe what are you trying to do:
Limit query params for specific backend

Your configuration file:

{
  "$schema": "https://www.krakend.io/schema/v3.json",
  "version": 3,
  "name": "KrakenD Community API Gateway",
  "port": 8080,
  "host": ["http://fake_api"],
  "timeout": "3000ms",
  "cache_ttl": "300s",
  "debug_endpoint": true,
  "endpoints": [
    {
      "endpoint": "/test",
      "method": "GET",
      "input_query_strings": ["site", "test"],
      "backend": [
        {
          "encoding": "json",
          "method": "GET",
          "input_query_strings": ["site"],
          "host": ["http://localhost:8080"],
          "url_pattern": "/__debug/"
        }
      ]
    }
  ],
  "sequential_start": true
}

Configuration check output:
Result of krakend check -dtc krakend.json --lint command

Parsing configuration file: krakend.json
Global settings
	Name: KrakenD Community API Gateway
	Version: 3
	Address: 
	Port: 8080
	Default backend hosts: [http://fake_api]
1 API endpoint(s):
	- GET /test
	Timeout: 3s
	QueryString: [site test]
	Connecting to 1 backend(s):
		[+] GET /__debug/
		Timeout: 3s
		Hosts: [http://localhost:8080]

0 async agent(s):
Syntax OK!

Commands used:
How did you start the software?

playground-community git:(master) ✗ make start

Logs:

krakend_ce-1  | [00] [KRAKEND] 2025/07/22 - 17:38:53.096 ▶ DEBUG [ENDPOINT: /__debug/*] Method: GET
krakend_ce-1  | [00] [KRAKEND] 2025/07/22 - 17:38:53.106 ▶ DEBUG [ENDPOINT: /__debug/*] URL: /__debug/?site=site&test=test
krakend_ce-1  | [00] [KRAKEND] 2025/07/22 - 17:38:53.118 ▶ DEBUG [ENDPOINT: /__debug/*] Query: map[site:[site] test:[test]]
krakend_ce-1  | [00] [KRAKEND] 2025/07/22 - 17:38:53.131 ▶ DEBUG [ENDPOINT: /__debug/*] Params: [{param /}]
krakend_ce-1  | [00] [KRAKEND] 2025/07/22 - 17:38:53.150 ▶ DEBUG [ENDPOINT: /__debug/*] Headers: map[Accept-Encoding:[gzip] User-Agent:[KrakenD Version 2.9.4]...

Additional comments:
Tried to use input_headers, and its looks fine.
Am I wrong with input_query_strings?

There is cURL:

curl --location 'http://localhost:8080/test?test=test&site=site&test2=test2'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions