spring-cloud / spring-cloud/spring-cloud-gateway

What if the proxied service is case-insensitive

Open
#2,687 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

Our proxied service is tolerant about the casing of it's request parameters.
But we'd like to map one request parameter;

We would like to support this caseinsensitve feature, because of different types of clients that are involved.

So ideally the Query predicates should handle parameter names in a case-insensitive way

This might be achieved by having the MultiValueMap queryParams in the QueryRoutePredicateFactory based on a org.springframework.util.LinkedCaseInsensitiveMap?

sample:

having a request: ?REQUEST=getcapabilities

In a GlobalPostFilter i can see this with:

        LinkedCaseInsensitiveMap map = new LinkedCaseInsensitiveMap();
        map.putAll(exchange.getRequest().getQueryParams());
        logger.info("REQUEST:{}", map.get("request"));

mapping on Query: Request would not have mapped.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating QueryRoutePredicateFactory and reading how Query predicates obtain and compare request parameter names. Use the reported REQUEST/request example to define the expected matching behavior, then verify that Query predicate routing handles parameter names case-insensitively without changing unrelated query handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.