spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.51k stars 3.31k forks source link

What if the proxied service is case-insensitive #2687

Open huub opened 2 years ago

huub commented 2 years ago

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.

MallikharjunaTeja commented 2 years ago

Hi @huub i want to work on this

spencergibb commented 6 months ago

This is not something we plan to do.