spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

What if the proxied service is case-insensitive

Open huub opened this issue 2 years ago • 1 comments

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.

huub avatar Jul 28 '22 13:07 huub

Hi @huub i want to work on this

MallikharjunaTeja avatar Sep 10 '22 07:09 MallikharjunaTeja

This is not something we plan to do.

spencergibb avatar Mar 13 '24 17:03 spencergibb