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

Add Support to Allow Case Sensitivity in Path Route Predicate Factory

Open
#1,382 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is there any support of way we could use a custom Ant PathMatcher for the Path Route Predicate Factory? The benefit of this is we could reduce more pattern definitions in the path predicate factory.

E.g. The following is really impractical:

builder.routes()
    .route("foo-service", r -> r.path("/bar", "/Bar", "/BAR").uri("https://example.com"));

Proposed - the third parameter of the path factory method would take the caseInsensitive and use it to construct the PathMatcher:

builder.routes()
    .route("foo-service", r -> r.path("/bar", false, true).uri("https://example.com"));

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 the Path Route Predicate Factory and the route builder's path API described in the issue. Determine how a custom Ant PathMatcher or case-sensitivity option would fit there, then verify that the proposed route syntax can distinguish matching behavior; done means path predicates support the requested case-sensitivity control without requiring repeated patterns.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.