spring-cloud / spring-cloud/spring-cloud-gateway
What if the proxied service is case-insensitive
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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